angularangular2-material

Compile Material 2 theme


As per the material design documentation, if we want to create custom theme all we need to do is to include an .scss file as per the guidelines. I did the same but the scss files are not getting compiled. So do we need to compile the scss separately and then add it to the themes? or the compilation will be handled by angular2.


Solution

  • Include the theme file under the src folder. Then it needs to be added to the angular-cli.json styles section as well.

      {
        ...
        "apps": [
          {
            ...
            "styles": [
              "theme.scss"
            ],      
          }
        ],
      ...
      }