Relative Content

Tag Archive for angularsvgangular-material

Angular Light/Dark Mode Switcher Reloads Entire Page When Clicking

I’m working on an Angular application with a light/dark mode switcher. The switcher is supposed to toggle between light and dark mode and also change the logo (which is an SVG image) accordingly. However, when I click on the switcher, it appears as though the entire page reloads.
Clicking on the theme switcher causes the whole page to refresh or reload.