Angular Material2 theming - how to set app background?

后端 未结 10 1661
别那么骄傲
别那么骄傲 2020-12-04 14:24

I am building an angular2 app using angular material2. I am trying to set the background of my application \"the correct way\", but I can\'t figure out how.

I found

10条回答
  •  广开言路
    2020-12-04 15:02

    Not exactly answer to your question, but I guess many people will end up here searching for "how to set app background color".

    In your project/index.html set your body class to mat-app-background

    
      
    
    

    And make sure in your project/angular.json you have:

            "styles": [
              "./node_modules/@angular/material/prebuilt-themes/YOUR_STYLE.css",
              ...
            ],
    

提交回复
热议问题