Quantcast
Channel: Angular: conditional class with *ngClass - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Answer by Chaitanya Nekkalapudi for Angular: conditional class with *ngClass

$
0
0

with the following examples you can use 'IF ELSE'

<p class="{{condition ? 'checkedClass' : 'uncheckedClass'}}"><p [ngClass]="condition ? 'checkedClass' : 'uncheckedClass'"><p [ngClass]="[condition ? 'checkedClass' : 'uncheckedClass']">

Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>