Reputation: 885
I'm beginning with Angular material.After install dependencies I can use the components but cant't see any colors.
First I've installed the theme at styles.css :
@import "~@angular/material/prebuilt-themes/purple-green.css";
But witth no results.
Then I used a reference at index.html :
<link href="node_modules/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">
No results too. All remains black and white.
Any ideas ?
Upvotes: 0
Views: 8536
Reputation: 8603
What happens if you set a color attribute to your component like e.g.
<button md-raised-button color="primary">Click me!</button>
This should normally result in a colored button:
Upvotes: 1
Reputation: 72
please tell more about your project, which version of angular? surely you are doing wrong, if it's angular cli project, you need to add in in .angular-cli.json, you should see a property named styles, add it there
Upvotes: 2
Reputation: 34673
In your .angular-cli.json
add the following in your styles
entry:
styles: [
"../node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
]
then run ng build
in your terminal window.
Upvotes: 2