You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide a way to bind class at runtime in template #2927
Angular2 currently provide a way to bind css class as [class.fa-train]="true", it is great if you can also bind them at runtime, something like [class:variable]="true" or simply [class:variable].
Here is a simple example,
this.icons=['fa-train','fa-subway','fa-bed']
<i*ng-for="#icon of icons" class="fa" [class:icon]="true"></i>
Activity
matanlurey commentedon Jul 8, 2015
You should be able to use [class] from #2664. In your example:
coldume commentedon Jul 8, 2015
Thanks, this is exactly what I want!
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.