ngclass angularjs example via function in ng-class Example: ng class [ngClass]="{'text-success':person.country === 'UK'}"