|
|
|
@@ -25,12 +25,14 @@ export class MallsPage implements OnInit { |
|
|
|
) { } |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
if (localStorage.allMalls) { |
|
|
|
this.allMalls = JSON.parse(localStorage.allMalls); |
|
|
|
this.tempMalls = JSON.parse(localStorage.allMalls); |
|
|
|
} else { |
|
|
|
this.getMallsByLocation() |
|
|
|
} |
|
|
|
this.getMallsByLocation(); |
|
|
|
} |
|
|
|
|
|
|
|
toggleMallBookmark(index: number) { |
|
|
|
this.tempMalls[index].mall.is_bookmarked = !this.tempMalls[index].mall.is_bookmarked; |
|
|
|
this.allMalls[index].mall.is_bookmarked = !this.allMalls[index].mall.is_bookmarked; |
|
|
|
localStorage.allMalls = JSON.stringify(this.allMalls); |
|
|
|
this.mallService.updateMallData(this.tempMalls[index]); |
|
|
|
} |
|
|
|
|
|
|
|
doRefresh(e: any) { |
|
|
|
|