Request Timeout? ?? How to Use Routerlink to Navigate to 3 Pages

I have a button (current page is: /abc) when click it navigate to [routerLink]="['/loading']"! and I wanna after go /loading(finish page loading) then it goes to /animation link, then finally back to /result page. how can I router to 3 links ?? do I need to create func in x.compent.ts ??

2

1 Answer

You can make a function and add the timeout for the loading route like this:-

setTimeout(() => {
    this.router.navigate(["lastpage"]);
}, 2000);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest