Fix on route change event

This commit is contained in:
Peter Maquiran
2021-07-16 15:43:37 +01:00
parent 144444e1b2
commit 5e6e8e17f3
18 changed files with 130 additions and 119 deletions
@@ -20,6 +20,8 @@
</ion-header>
<ion-content>
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div *ngIf="diplomasList">
<ion-list *ngSwitchCase="'validar'">
<ion-item
@@ -36,11 +36,18 @@ constructor(
const location = window.location
const pathname = location.pathname + location.search
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
this.LoadList();
}
});
setTimeout(()=>{
// update list
const location = window.location
const pathname = location.pathname + location.search
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
this.LoadList();
}
});
}, 10)
}
segmentChanged(ev: any) {