Ionic Angular App Dynamic Theming — Server-Side Configuration

Overview

Step 1

Step 2

Step 3

private loadStyle() {
const styleURL = 'http://www.xyz.com/MyApp/styleConfig.json';
if (!_.isEmpty(styleURL)) {
this._http.get(styleURL).subscribe((jObj: any) => {
Object.keys(jObj.cssVars).forEach(k => {
document.body.style.setProperty(k, jObj.cssVars[k]);
});
});
}
}

Donation😇

Lead Full Stack & DevOps Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store