ng-class="{{'tabs-'+currentStyle.value}}"
ng-class="'tabs-'{{currentStyle.value}}"
ng-class="tabs-{{currentStyle.value}}"
i am trying to apply a class based on a value, i tried all of the above and i always get
Error: [$parse:syntax] Syntax Error: Token 'undefined' not a primary expression at column null of the expression [tabs-] starting at [tabs-].
what am i doing wrong?
i simply want the result to be class="tabs-currentStyle.value" without having to declare an extra variable in the scope
This also works:
ng-class="['tabs-'+currentStyle.value]">
Just tried it in Dalorzo's online demo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With