-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng-class equivalent behaviour #2025
Comments
This syntax is not currently supported with the existing We should probably re-discuss this and have definitive stance on this one. |
The current best option, AFAICT, is to re-write the above example as: which is super-fugly. |
@jbdeboer I had a similar problem and used following syntax: <div class="a" [class.b]="bExpr" [class.c]="cExpr"></div> There is also the |
@SekibOmazic Yes; but that approach would require us to rewrite our controller logic; which isn't something we are eager to do! Thinking on the "best option" that I listed: it does not work well either, since in Angular1, we don't know if |
Assigning to @mhevery and (also @IgorMinar) for discussion. Is this something that we can support in angular2, or else, what's our best recommendation for handling this pattern? |
I think it's safe to support |
I agree with @yjbanov, I think we should support it. |
Also fix for ng-style |
Assigning to @vsavkin to clarify what needs to be implemented. |
Had a productive chat with @vsavkin - I'm unblocked. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
[If this already exists, a pointer to the docs would be awesome.]
In AngularDart, I have an element:
<div class="a" ng-class="someExpr"></div>
wheresomeExpr
evaluates to "b c".The rendered output is
<div class="a b c"></div>
.How do I use this pattern in Angular 2?
The text was updated successfully, but these errors were encountered: