“Halaman Refresh TypeScript Angular” Kode Jawaban

Halaman Refresh 8 Ts Angular

refresh(): void {
    window.location.reload();
}
Mostafa Bazyar

Halaman Refresh TypeScript Angular

this.router.routeReuseStrategy.shouldReuseRoute = function(){
            return false;
         };
this.router.events.subscribe((evt) => {
            if (evt instanceof NavigationEnd) {
               // trick the Router into believing it's last link wasn't previously loaded
               this.router.navigated = false;
               // if you need to scroll back to top, here is the right place
               window.scrollTo(0, 0);
            }
        });
Excited Echidna

Halaman Refresh 8 Ts Angular

<button (click)="refresh()">Refresh</button>
Mostafa Bazyar

Jawaban yang mirip dengan “Halaman Refresh TypeScript Angular”

Pertanyaan yang mirip dengan “Halaman Refresh TypeScript Angular”

Lebih banyak jawaban terkait untuk “Halaman Refresh TypeScript Angular” di TypeScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya