-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Feature request: Angular2 like class and style property binding [class.property]="expresion" #4956
Comments
I don't think it's a good idea to introduce another syntax for classes that doesn't achieve anything new. The only gain I see here is 5 characters. It's better having a flexible, explicit syntax that 3 convenient short ones |
Plus, if you use the shorthand version, you get the 5 characters plus 1 back. 😄
Scott |
Not going to happen, sorry. I don't really see the point of introducing alternative syntax. |
this feture is what I need , It will make things more easy. |
what I need is :class="{'class-name': (this.somethings === "something")}" |
You can do exactly that already. |
Example
More about:
https://scotch.io/tutorials/angular-2-classes-with-ngclass-and-ngstyle#using-the-styleproperty-binding
The text was updated successfully, but these errors were encountered: