Looking for a solution similar to the question about Changing website favicon dynamically
To achieve this, you will have to manipulate the native DOM link element.
Here is an example of how you can do it:
HTML
<link rel="icon" id="favIcon" type="image/x-icon" href="./assets/favicon.ico" />
Typescript
export class AppComponent implements OnInit {
favIcon: HTMLLinkElement = document.querySelector('#favIcon');
constructor() {
this.favIcon.href = './favicon_path_folder/favicon.ico';
}
}
By using this approach, you can update the 'href' attribute of the faveIcon link when needed, such as when the client switches or in ngOnInit of your target component.