“ponownie uruchom komponent kątowy” Kod odpowiedzi

ponownie uruchom komponent kątowy

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

ponownie uruchom komponent kątowy

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

Odpowiedzi podobne do “ponownie uruchom komponent kątowy”

Pytania podobne do “ponownie uruchom komponent kątowy”

Więcej pokrewnych odpowiedzi na “ponownie uruchom komponent kątowy” w TypeScript

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

Przeglądaj inne języki kodu