zpilqw
Last Updated: February 25, 2016
·
305
· st44100
Fb1edbddf6ff2315cbc1b800dee8ab38

Writing multiline ng-class in Jade

You can write like this ↓

div(
  ng-class= "{" +
    "'cls-a': type === 'a'," +
    "'cls-b': type === 'b'," +
    "'cls-c': type === 'c'," +
    "'cls-d': type === 'd'"
  "}"
).base-class
 p こんにちは

and You can edit all attribute at the same time.
LIke this ↓

pr.gif

Say Thanks
Respond