Simple ngClass question

14 views
Skip to first unread message

Istvan Bekesi

unread,
Jun 2, 2014, 8:24:49 AM6/2/14
to ang...@googlegroups.com
Hi all, I was just wondering why solution 3 does not work in my plunk: http://plnkr.co/edit/yzlFHa5RBFHEpb9Gl3y1?p=preview


Sander Elias

unread,
Jun 2, 2014, 8:40:21 AM6/2/14
to ang...@googlegroups.com

Hi Istvan,

you can’t add multiple classes within a single property. Remember it still are properties of an object.
<i ng-class="{'fa': true, 'fa-eye-slash' : blinkBoolean, 'fa-eye' : !blinkBoolean }"></i> will work tough.
Still, I would prefer option 2.

Regards
Sander

Békési István

unread,
Jun 2, 2014, 9:02:30 AM6/2/14
to ang...@googlegroups.com
Hi Sander!
Thanks a lot, it's clear now!



--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/tvfppc4se5Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages