Ricardo Gomes
Ricardo Gomes

Reputation: 1266

Google Material Design different theme per module

I'm trying out Google's Material Design stuff, and there's something I'm having a problem with that you guys might be able to help.

I want to have a different theme per "major" module in my app.

I tryed using

$mdThemingProvider.theme('default');

In the config of each module, but I'm getting that theme is undefined. The only methods available are setDefaultTheme and alwaysWatchTheme

I'm using the latest stable release as I just installed via

bower install angular-material --save

Can you guys spot what I'm doing wrong?

UPDATE:

So I posted an issue on github and found my problem (the documentation online is for the master branch not the stable branch

https://github.com/angular/material/issues/1039

But I'm still trying to figure out how I can assign different themes to different modules

Upvotes: 1

Views: 1132

Answers (1)

cole
cole

Reputation: 21

Looking further down the strand of the issue you posted to github, I noticed the suggestion to update your version of angular-material in bower.json.

"angular-material": "0.7.0-rc1-master-84842ff"

This worked for me and now I'm able to define my own theme just like was specified in the docs.

$mdThemingProvider.theme("customTheme").primaryColor("pink").accentColor("green");

Upvotes: 1

Related Questions