atanamir
0
Q:

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 */

    }
}
0
ngOnInit(){
 this.appendCss(this.customizeFormData);
}
-1

New to Communities?

Join the community