I created a global style sheet using sass and put it in the public/style/styles.scss
. I only specify a background color.
In the index, I added a link to
Sep 2019:
Most other posts are old.
File: \angular.json
Key : projects > myProjectNameHere > architect > build > styles
"styles": [
"src/styles.css",
"node_modules/font-awesome/css/font-awesome.css",
{
"input": "./node_modules/bootstrap/dist/css/bootstrap.css"
}
],
File: src/styles.css
/* You can add global styles to this file, and also import other style files */
/* That is, have put css that is common for all pages in this file. */
body {
font-family: "Ubuntu", sans-serif;
}
With above two things, the css is applying fine to all pages.
So, nothing new to be done if you have Angular 8 or above.
If you have an issue, then you only need to clear cache (or, do Ctrl + Shift + R )