Selaa lähdekoodia

Pull down to refresh in malls page

master
kj1352 5 vuotta sitten
vanhempi
commit
cefeb320e3
3 muutettua tiedostoa jossa 26 lisäystä ja 0 poistoa
  1. +7
    -0
      src/app/cart/cart.page.ts
  2. +9
    -0
      src/app/malls/malls.page.html
  3. +10
    -0
      src/app/malls/malls.page.ts

+ 7
- 0
src/app/cart/cart.page.ts Näytä tiedosto

@@ -62,6 +62,13 @@ export class CartPage implements OnInit {
url: url
}
});

modal.onDidDismiss().then(() => {
this.showMenuButton();
localStorage.removeItem('userCart');
this.router.navigate(['/profile']);
});

return await modal.present();
}



+ 9
- 0
src/app/malls/malls.page.html Näytä tiedosto

@@ -1,4 +1,13 @@
<ion-content>
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="arrow-down"
pullingText="Pull to refresh"
refreshingSpinner="circles"
refreshingText="Refreshing...">
</ion-refresher-content>
</ion-refresher>
<div class="overlay" [ngClass]="{ 'active' : show_sort_popup }"></div>

<section class="header-bar">


+ 10
- 0
src/app/malls/malls.page.ts Näytä tiedosto

@@ -25,7 +25,17 @@ export class MallsPage implements OnInit {
) { }

ngOnInit() {
if (localStorage.allMalls) {
this.allMalls = JSON.parse(localStorage.allMalls);
this.tempMalls = JSON.parse(localStorage.allMalls);
} else {
this.getMallsByLocation()
}
}

doRefresh(e: any) {
this.getMallsByLocation();
e.target.complete();
}

toggleSearchBar() {


Ladataan…
Peruuta
Tallenna