Skip to content

Commit

Permalink
fix(theme-picker) fix theme picker bugs on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-firstorder authored Aug 2, 2018
1 parent 8a0eb75 commit 6ec4b4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/shared/theme-picker/theme-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6ec4b4b

Please sign in to comment.