Angular ng-if 总是触发 Ui 路由器 $state.is 与某物不同

Angular ng-if triggered always that Ui Router $state.is is different to something

我想在 Angular 中用 Ui 路由器编写一个 ng-if 表达式,以便它总是在状态不匹配特定状态时触发。

类似于$state.is(!'notThisState')

提前致谢!

我想你要找的是:

<div ng-if="$state.current.name !== 'notThisState'">
 Your div goes here.
</div>