I'm learning angular and I'm testing the directive ngClass. With ngClass I can do something like that:
<li ng-repeat="language in languages" ng-class="{line:$even}">{{language}}</li>
But I can also do this with the css selectors:
li:nth-child(even) {
// some css code here
}
What is better?
ng-class="{line:$even}. The css approach does not need javascript; thats the difference.