diff --git a/src/app/shared/theme-picker/theme-picker.ts b/src/app/shared/theme-picker/theme-picker.ts index 8bd5bae72..f65cca23d 100644 --- a/src/app/shared/theme-picker/theme-picker.ts +++ b/src/app/shared/theme-picker/theme-picker.ts @@ -63,7 +63,10 @@ export class ThemePicker { if (theme.isDefault) { this.styleManager.removeStyle('theme'); } else { - this.styleManager.setStyle('theme', `assets/${theme.href}`); + // use timout to fix https://github.com/angular/material.angular.io/issues/495 + setTimeout(() => { + this.styleManager.setStyle('theme', `assets/${theme.href}`); + }); } if (this.currentTheme) {