upfix localstorage iframe

This commit is contained in:
_Bastler
2022-03-20 11:21:25 +01:00
parent 578e6e6981
commit 5a9caf69a5
6 changed files with 68 additions and 37 deletions
+7 -2
View File
@@ -18,7 +18,10 @@ export class ServicesComponent implements OnInit {
ngOnInit(): void {
this.view = localStorage.getItem("bstly.servicesView") || 'grid';
this.view = 'grid';
try {
this.view = localStorage.getItem("bstly.servicesView") || this.view;
} catch { }
this.serviceService.services().subscribe({
next: (data: Array<any>) => {
@@ -39,7 +42,9 @@ export class ServicesComponent implements OnInit {
}
updateView(): void {
localStorage.setItem("bstly.servicesView", this.view);
try {
localStorage.setItem("bstly.servicesView", this.view);
} catch { }
}
}