-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue.material.registerTheme causes an error #1454
Comments
Do you have Vue in your project? What version of vue-material you using? |
I have the same issue, my vue version is 2.5.2 and vue material version is 1.0.0-beta-7 |
You have to use new API for |
Thanks a lot! |
If I want use several themes in my app: @include md-register-theme("yellow", ( @include md-register-theme("indigo", ( How could I force change theme on my app? |
Do you using SCSS? @larrymacbarry |
Yes. I wanna change color themes in app using js methods in a components |
@larrymacbarry do you have included theme engine? like is in docs? |
yes: @import "~vue-material/dist/theme/engine"; @include md-register-theme("default", ( @include md-register-theme("yellow", ( @include md-register-theme("indigo", ( @import "~vue-material/dist/theme/all"; // Apply the theme It's working as I change colors for "default" How to apply my 'indigo' theme dynamically in component on emit event callback? |
@larrymacbarry you can apply theme to components with |
I get it. Thx, It will be fine to include that string to https://vuematerial.io/themes/configuration |
@Samuell1
Tried, but did not work. |
@paraself yes like that but md-app doesnt have that, only other components or you can change theme globally with
|
Thanks, this is exactly that I am looking for! |
@samuel1 I am looking to switch between default theme and dark theme for my entire app and I couldn't figure out how to do this. Here is my and here is the I want to use that switch to toggle the theme of |
Trying to register my theme:
Vue.use(VueMaterial);
Vue.material.registerTheme( 'default', { primary: 'red' } );
And it causes a next error:
Uncaught TypeError: _vue2.default.material.registerTheme is not a function
The text was updated successfully, but these errors were encountered: