Answers for "add css dynamically in angular 6"

CSS
-1

add css dynamically in angular 6

import { CssService} from './Css.service';

@Component({
  selector: 'DynamicCss',
  templateUrl: './DynamicCss.component.html',
  styleUrls: ['./DynamicCss.component.scss']
})
export class ServiceProviderComponent implements OnInit {
    cssVariables: any;
    constructor(private cssService:CssService){
        /* call the service/api to get the css variable values in cssVariables */

    }
}
Posted by: Guest on September-11-2020
-2

add css dynamically in angular 6

ngOnInit(){
 this.appendCss(this.customizeFormData);
}
Posted by: Guest on September-11-2020

Browse Popular Code Answers by Language