Answers for "how to reload same page in angular 8"

4

How to Reload a Component in Angular

reloadComponent() {
  let currentUrl = this.router.url;
      this.router.routeReuseStrategy.shouldReuseRoute = () => false;
      this.router.onSameUrlNavigation = 'reload';
      this.router.navigate([currentUrl]);
  }
Posted by: Guest on September-25-2020
1

angular reload component

reloadCurrentRoute() {
    let currentUrl = this.router.url;
    this.router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
        this.router.navigate([currentUrl]);
    });
}
Posted by: Guest on September-25-2020
0

how to reload same page in angular 8

No mames, simplemente usa el reload... Por qué en los foros siempre se las quieren lucr y terminan colocando vainas que ni sirven
Posted by: Guest on April-06-2021

Code answers related to "how to reload same page in angular 8"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language