Answers for "ng add class"

CSS
0

add classon ng if

[ngClass]="{'my-class': step === 'step1'}"
Posted by: Guest on June-11-2020
1

angualr add class to component

@Component({
   selector: 'app-your-component',
   templateUrl: './your-component.component.html',,
   host: {'class': 'your-class'}
})
export class YourComponent implements OnInit {
...
}
Posted by: Guest on January-19-2021

Browse Popular Code Answers by Language