Angular Material Style Class not working

前端 未结 6 1672
后悔当初
后悔当初 2021-01-04 10:57

I\'m using Angular Material to add Date Picker to my app. For some reason the angular material is not applying the original angular materia

6条回答
  •  [愿得一人]
    2021-01-04 11:20

    According to Official Documentation of Angular Material:

    Including a theme is required to apply all of the core and theme styles to your application.

    To get started with a prebuilt theme, include one of Angular Material's prebuilt themes globally in your application.

    You can simply add the following to your style.css in order to get it work:

    @import "~@angular/material/prebuilt-themes/indigo-pink.css";
    

    Or you can directly include using tag in your head tag.


    P.S: To create your own custom built theme visit https://material.angular.io/guide/theming

提交回复
热议问题