我有以下身体标签
<body class="loaderParent" ng-class="">
如果$ state.includes(&#39; home&#39;),如何删除loaderParent类?
答案 0 :(得分:2)
<body ngClass="{loaderParent: !$state.includes('home')}">
为什么不读the documentation?
答案 1 :(得分:1)
您可以将对象放在ng-class
中,如下所示:
<body ng-class="{ loaderParent: callControllerMethod() }">