Posts by CaioEduT • 31 points
2 posts
-
2
votes2
answers233
viewsA: How to use a $Scope variable within ng-class
I managed using ternary operator in the class attribute : class="{{menu == '#background' ? 'text-' + color + '-6' : ''}}"
-
1
votes2
answers233
viewsQ: How to use a $Scope variable within ng-class
I have the following code: <a ng-class="{'text-{{color}}-6': menu == '#background'}" href="#background"> My Menu </a: It works, at first it adds the text-red-6 class to the element. But…