Answers for "refresh component from ts angular"

2

angular typescript refresh page

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);
            }
        });
Posted by: Guest on March-03-2020
0

angular 8 ts refresh page

<button (click)="refresh()">Refresh</button>
Posted by: Guest on November-25-2020

Code answers related to "refresh component from ts angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language