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 ↓
Written by st44100
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jade
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#