diff --git a/src/app/app.component.html b/src/app/app.component.html
index 4174925570..f7e1b1b0df 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,4 +1,5 @@
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 76d96cb69d..e58682dc76 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -87,6 +87,13 @@ export class DocsAppComponent implements AfterViewInit {
this.dir = getDirection();
}
+ get activeTheme(): string {
+ return localStorage.getItem('theme');
+ }
+ theme(theme: string): void {
+ localStorage.setItem('theme', theme);
+ }
+
ngAfterViewInit(): void {
// broadcast to all listener observables when loading the page
setTimeout(() => { // workaround since MatSidenav has issues redrawing at the beggining
diff --git a/src/app/components/toolbar/toolbar.component.html b/src/app/components/toolbar/toolbar.component.html
index 9610aff528..ed3570fa1c 100644
--- a/src/app/components/toolbar/toolbar.component.html
+++ b/src/app/components/toolbar/toolbar.component.html
@@ -48,5 +48,13 @@ CDK and material@beta.12 support
swap_horiz
{{dir.toUpperCase()}}
+
+
\ No newline at end of file
diff --git a/src/app/components/toolbar/toolbar.component.ts b/src/app/components/toolbar/toolbar.component.ts
index f043f1bb44..f80b031cb7 100644
--- a/src/app/components/toolbar/toolbar.component.ts
+++ b/src/app/components/toolbar/toolbar.component.ts
@@ -37,4 +37,11 @@ export class ToolbarComponent {
this._dir.dir = dir;
setDirection(dir);
}
+
+ get activeTheme(): string {
+ return localStorage.getItem('theme');
+ }
+ theme(theme: string): void {
+ localStorage.setItem('theme', theme);
+ }
}