1

How change meta tag "theme-color" on change Vuex state? Using: Vue, Vuex, register-service-worker, @vue/cli-plugin-pwa

MjM
  • 571
  • 4
  • 15

1 Answers1

1

You should dispatch an event, inside of it, in your store file, change the meta tag like so:

document.querySelector('meta[name="theme-color"]').setAttribute("content", yourValueHere);

More info: https://stackoverflow.com/a/36073112/2745485

Yousof K.
  • 1,374
  • 13
  • 23