How to change whole page background-color in Angular

Efim Rozovsky picture Efim Rozovsky · Oct 10, 2017 · Viewed 66.8k times · Source

I am trying to change the background color for the whole page in Angular(would use body, or html tag when working without framework). and I can't find the best practice for this, I want it to be within the framework if possible since I am building an application for years to come.

Answer

Andresson picture Andresson · Oct 10, 2017

If you are using angular-cli.
There should exist a global style file.

  • src
    • app
    • assets
    • environments
    • index.html
    • styles.css

In there you should be able to put your style e.g. html { background-color: black; } to effect the whole page.