Dynamic styleUrls in angular 2?

后端 未结 5 1575
借酒劲吻你
借酒劲吻你 2020-11-30 07:50

Is it possible to dynamically inject urls to stylesheets into a component?

Something like:

styleUrls: [
  \'stylesheet1.css\',
  this.additionalUrls
         


        
5条回答
  •  醉话见心
    2020-11-30 08:21

    I used the stylesheet link in the html template with ngIf condition, it worked for me.

    
    
    

提交回复
热议问题