Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
ngclass ternary
J. Doe
Programming language:
Whatever
2021-07-11 11:22:02
0
Q:
ngclass ternary
Ahmed Emad
Code:
Whatever
2021-09-04 09:53:28
<div [ngClass]="varA === varB ? 'css-class-1' : 'css-class-2'">
0
Tags
class
Related
ngclass condition
ng class ternary
[ngClass.gt-xs]
ngClass withing ngFor
ngclass
New to Communities?
Join the community