Can I change ios/android theme dynamically?

Let say I have an iphone, the app will start with the ios theme by default.

If I want to switch to the “md” theme, what would be the function to do it, if any? I did not find anything on “Config”


It’s actually documented, but you have to do a little research. If you take a look over here: it states that ‘You can change the mode that gets assigned in the configuration of your app. Therefore, if you wanted the Material Design md mode on iOS, you could do it.’

So. if you look at the documented API, we see a config possibility. It has exactly what you are asking for.

Try this one:
template: <ion-nav [root]="root"></ion-nav>
config: {
mode: ‘md’

Yeah, I know that one, but this is only when the app starts. It will take that config info.

What about after the app started. Is there a way to load a different css file?

Why would you want to change css styles after startup? You want to change the default style after everything is rendered?

Only if possible. Probably not, but I had to ask. :slight_smile:

I will just re-run the app once the change is done

This might do what you need: It seems like you can change app-wide styling at runtime.

where did you see that exactly? I know you can change it from the browser, but what about on the phone?

I’m only going off the example since it has a button to reload the configuration. I’ve never used it so I can’t help you beyond that, sorry.