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 }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Current behavior:
In AngularJS 1.6 (and even in 1.7.0) the ngStyle directive was able to add/remove single properties when the expression for the single property was evaluated as false.
For example: ng-style="{'float': isRight && 'right' }"
was dynamically adding/removing the 'float: right' style when the isRight scope expression changed.
In Angular 1.7.8 this only happens when isRight switches from false to true. Switching back to false will leave the 'float: right' style set.
As a workaround, this expression instead works in both 1.6.x and 1.7.8: ng-style="isRight && {'float': 'right' }"
Expected / new behavior:
Expressions like ng-style="{'float': isRight && 'right' }"
should be still supported for backward compatibility. Or at least the change (if intentional) should be documented in the changelog documentation.
Regards