-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Modals do not appear to respect theming #525
Comments
I will take a look at this. Which build are you using? |
We are using the source at the tag v0.5.1. Many thanks |
Indeed, this appears to be an issue with |
I'm still seeing this issue. Has it re-appeared or what? |
@hkjels I'm having the same issue, can you share a snippet how you are adding to dialog? |
snippet
theme shows up in the alert object but does not apply to toolbar and button elements. |
I just went around the issue by passing the theme as a local. It's just two extra lines of code, so I can live with it. Still think this should be fixed, but I'm spending my time elsewhere. |
+1 |
I'm also still experiencing this issue. Are we required to use md-theme in out dialogs, and pass the theme variable through locals? |
+1 |
1 similar comment
+1 |
EDIT:
It is a bit confusing because the behavior makes you think it uses the default theme which is only true because the parent element was set wrong. I think the best option would be to provide some general service in angular that has methods to switch the overall theme of the app and use the |
@dpoetzsch even setting the parent explicitly to one with the correct theme does not solve the issue. The theme must be set within the dialog itself. |
@hkjels http://codepen.io/dpoetzsch/pen/GjRdWp or did I misunderstand the problem? One important thing is to have a current version of angular material (this one is with angular 1.5.8 and angular material 1.1.0) |
Great! I missed the part with
Can probably close this one now |
@dpoetzsch fix doesn't work for me either unfortunately. Isn't there any way to set the dialog theme programmatically at least? |
1.3.0 broke dialog theme inheritance from designated parent in dialog config. Anything we can do? |
@johannesjo As I just noticed this used to work with angular-material 1.1.1 and was broken in 1.1.2. Well, this sucks! See here (only thing change from above is the use of angular-material 1.1.2): http://codepen.io/anon/pen/vgovwd |
I'm also having the same issue as dlombardi & dpoetzsch |
some news about this issue? on version 1.1.7 the issue persist |
When instantiating a modal, the modal always uses the "default" theme (e.g. the class
md-default-theme
), even though the modals DOM element is a child of<body>
on which I havemd-theme="custom-theme-name"
.I thought maybe we could use the $mdTheming service in our application's
.config
block to set the default theme name by callingsetDefaultTheme('custom-theme-name')
but from my initial investigation it seems as though this function is not public and so cannot be called from outside Angular Material.What is the intended solution for applying themes to modals?
The text was updated successfully, but these errors were encountered: