Angular - Directives
Why might using
ngClass with a falsy value like 0 or '' cause unexpected class application?ngClass with a falsy value like 0 or '' cause unexpected class application?In ngClass, keys with falsy values like 0, '', false, null, or undefined are ignored and their classes are not added.
This prevents unwanted classes from being applied when the condition is falsy.
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions