Search
 
SCRIPT & CODE EXAMPLE
 

HTML

ngclass else

<p class="{{condition ? 'checked' : 'unchecked'}}">
<!-- or -->
<p [ngClass]="condition ? 'checked' : 'unchecked'">
<!--or -->
<p [ngClass]="[condition ? 'checked' : 'unchecked']">
Comment

ngclass condition

[ngClass]="{'my-class': step === 'step1'}"
Comment

Angular 8 ngClass If

[ngClass]="{'my-class': step=='step1'}"
Comment

ngclass condition

[ngClass]="(step=='step1')?'my-class1':'my-class2'"
Comment

Angular 8 ngClass If

[ngClass]="(step=='step1')?'my-class1':'my-class2'"
Comment

ngclass condition

[class.my-class]="step === 'step1'"
Comment

Angular 8 ngClass If

[ngClass]="{'my-class': step=='step1', 'my-class2':step=='step2' }"
Comment

ngclass condition

[ngClass]="{'my-class': step === 'step1', 'my-class2':step === 'step2' }"
Comment

Angular 8 ngClass If

[ngClass]="{1:'my-class1',2:'my-class2',3:'my-class4'}[step]"
Comment

Angular 8 ngClass If

[class.my-class]="step=='step1'"
Comment

PREVIOUS NEXT
Code Example
Html :: how to add icon to custom page tab 
Html :: markdown new page 
Html :: html lowercase 
Html :: bootstrap bold 
Html :: indian phone pattern regex 
Html :: how to add an audio in html 
Html :: django html checkbox if condition chexked 
Html :: add placeholder in input type date 
Html :: html links 
Html :: how to change the size of an image in html 
Html :: how to show other website inside my website 
Html :: Add fav icon to browser tab 
Html :: libcuinj64-9.1 : Depends: libcuda1 (= 387.26) 
Html :: how to set link as normal text in html 
Html :: handlebars js cdn 
Html :: textarea angular onfocus 
Html :: crossorigin attribute values 
Html :: radio buttons html 
Html :: increase video speed html5 
Html :: jquery clear html before append 
Html :: how to navigate to another page in html 
Html :: ion-datetime cancel text 
Html :: html if en change to ltr 
Html :: default checked radio button 
Html :: font awesome show password icon 
Html :: is titanfall 2 good 
Html :: submit and open another page 
Html :: how to make a link in html that opens in a new tab 
Html :: html preload images 
Html :: input field in dropdown 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =