How to implement darkMode on Angular SSR

Discussão em 'Angular' iniciado por Raphaël Balet, Janeiro 25, 2025.

  1. I'm using angular Server Side Rendering.

    I now need to implement dark mode.
    For this purpose, I used to do the following window.matchMedia('(prefers-color-scheme: dark)'). but window shall not be used in this context as the variable doesn't exists yet.

    Did someone manage to implement darkMode with Angular SSR ?

    Continue reading...

Compartilhe esta Página