“Załaduj kątowy podrzędny” Kod odpowiedzi

Jak ponownie załadować komponent w kątowym

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

Załaduj kątowy podrzędny

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

Jak zrobić przeładowanie komponentu w kątowych

DeleteEmployee(id:number)
  {
    this.employeeService.deleteEmployee(id)
    .subscribe( 
      (data) =>{
        console.log(data);
        this.ngOnInit();
      }),
      err => {
        console.log("Error");
      }   
  }
Famous Fly

Odpowiedzi podobne do “Załaduj kątowy podrzędny”

Pytania podobne do “Załaduj kątowy podrzędny”

Więcej pokrewnych odpowiedzi na “Załaduj kątowy podrzędny” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu