diff --git a/packages/core/src/global/ionic-global.ts b/packages/core/src/global/ionic-global.ts index fa0fbf1c1d..226a181a82 100644 --- a/packages/core/src/global/ionic-global.ts +++ b/packages/core/src/global/ionic-global.ts @@ -14,7 +14,7 @@ if (!Context.dom) { // create the Ionic.config from raw config object (if it exists) // and convert Ionic.config into a ConfigApi that has a get() fn -Context.config = createConfigController( +Ionic.config = Context.config = createConfigController( Ionic.config, detectPlatforms(window.location.href, window.navigator.userAgent, PLATFORM_CONFIGS, 'core') ); @@ -23,7 +23,7 @@ Context.config = createConfigController( // first see if the mode was set as an attribute on // which could have been set by the user, or by prerendering // otherwise get the mode via config settings, and fallback to md -Context.mode = document.documentElement.getAttribute('mode') || Context.config.get('mode', 'md'); +Ionic.mode = Context.mode = document.documentElement.getAttribute('mode') || Context.config.get('mode', 'md'); // ensure we've got the mode attribute set on -document.documentElement.setAttribute('mode', Context.mode); +document.documentElement.setAttribute('mode', Ionic.mode);