Thursday, 7 January 2021

Load same component/Refresh same component

 

Load same component/Refresh same component in angular

loadSameUrl() {

  let currentUrl = this._router.url; // current url import router module inside constructor

  this._router.navigateByUrl('/', {skipLocationChange: true}).then(() => {

      this._router.navigate([currentUrl]);

  });

}