Angular 7 ngStyle Directive
Style elements dynamically with ngStyle: To change or style the properties like value, color, and the size of the elements in Angular, the ngStyle attribute is used. Example 1: component.ts file: import {Component} from ‘@angular/core’; @Component( {selector: ‘app-server’, templateUrl: ‘server.component.html’}) export class ServerComponent { serverID = 20; serverStatus = ‘Online’; constructor() { this.serverStatus = … Read more