I have an ng-class
where class is dynamically loaded i.e evaluating $rootscope
in expression, late binding is happening
<li role="presentation" style="width:200px" ng-class="{active: true, inactive: false}[{{vm.$rootScope.currentPage}}==1]"><a href="#/create">Create</a></li>
Here {{vm.$rootScope.currentPage}}
expression is evaluating after class for the control is loaded in place of that if give 1 it is working or and if I check in inspect element I can see [1==1]
i.e {{vm.$rootScope.currentPage}}
this is returning correct value but class is not getting applied
Can refer this Condition in ng- class not working