Search code examples
angularangular-materialangular-cli

Specifying the theme when running ng add @angular/material?


When running ng add @angular/material is it possible to specify which theme we want using a flag / parameter?

I noticed it's possible to run it with --defaults which results in the indigo pink theme ...


Solution

  • The theme can be set on the command line by using the theme option:

    ng add @angular/material --theme=purple-green