“Componente de recarga angular” Respostas de código

página de atualização angular sem recarregar

this.router.navigate(['path/to'])
  .then(() => {
    window.location.reload();
  });
DevPedrada

página de atualização angular

refresh(): void {
    window.location.reload();
}
|_Genos_|

Atualizar o componente atual angular

  reloadCurrentRoute() {
    let currentUrl = this._router.url;
    this._router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
        this._router.navigate([currentUrl]);
        console.log(currentUrl);
    });
  }
Foolish Fly

Como recarregar um componente no angular

reloadComponent() {
  let currentUrl = this.router.url;
      this.router.routeReuseStrategy.shouldReuseRoute = () => false;
      this.router.onSameUrlNavigation = 'reload';
      this.router.navigate([currentUrl]);
  }
Courageous Chamois

Componente de recarga angular

reloadCurrentRoute() {
    let currentUrl = this.router.url;
    this.router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
        this.router.navigate([currentUrl]);
    });
}
Courageous Chamois

Recarregue o subtonete angular

this.router.navigateByUrl('/RefreshComponent', { skipLocationChange: true }).then(() => {
    this.router.navigate(['Your actualComponent']);
}); 
|_Genos_|

Respostas semelhantes a “Componente de recarga angular”

Perguntas semelhantes a “Componente de recarga angular”

Mais respostas relacionadas para “Componente de recarga angular” em TypeScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código