Angular-2 : Change favicon icon as per configuration

前端 未结 6 1577
你的背包
你的背包 2021-01-31 09:53

I am rendering a dynamic page, menu and other items in my application. I also want to change favicon as per configured by admin.

Say, for example, if when my pag

6条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 10:19

    Outside , you can to use only Title class:

    import {Title} from '@angular/platform-browser';
    
    export class YourClass(){
    
      constructor(private title: Title){}
    
      yourNameMethod(){
        this.title.setTitle('your title');
      }
    }
    

提交回复
热议问题