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

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...