<p [ngClass]="{'red':false, 'green':true}"> Sure you understand Angular Directives! </p> <style> .red{color: red} .green{color: green} </style>