Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
445 views
in Technique[技术] by (71.8m points)

vue.js - How to change the favicon dynamically in VueJs

I would like to do this very common trick that is to be able to change the favicon of my VueJs app dynamically.

For example : I have a timer in my app that is running in background and I would like to change the favicon when the timer is running.

In VueJs since the favicon is set in the index.html file I really don't know how could I do to be able to modify it in others component of my app. ?

I tried this approach but it did not work

Thanks for your help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This will help, it is awesome libary with utilities for Vue 2 and 3. VueUse useFavicon


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...