Add refresh and improve performance

This commit is contained in:
Peter Maquiran
2021-07-16 12:59:43 +01:00
parent 7b93dbf1e2
commit 9f28fc1b03
21 changed files with 186 additions and 123 deletions
@@ -51,10 +51,13 @@ export class PedidosPage implements OnInit {
ngOnInit() {
this.LoadList();
const pathname = window.location.pathname
// update list
const location = window.location
const pathname = location.pathname + location.search
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == pathname) {
this.doRefresh();
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
this.LoadList();
}
});
}