Wednesday, 31 March 2021

NgClass binding from TS

  ANgular ngclass binding

<tr  *ngFor="let dm of extradomain ; let i = indexlet first = first;let last = last;" [ngClass]="bg_successfirst, bg_primary: !first, bg_danger : dm.domainStatus }">


in the above code for first tr bg_success class will applay. if it is last or not first bg_primary will apply.

No comments:

Post a Comment

remove duplicates in an sorted array

  using System; public class HelloWorld {          public static void Main(string[] args)     {         int[] ar={2,2,3,3,4,6,6};          C...