Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49362

Adding route path to router history

$
0
0

We use Angular and Ionic 4 for an application, and we need to navigate to a specific page by passing through others to create a router history.

As of now, we allow the user to go back using the back button, we had to create a stack of routes and go through them, but we can see on screen the navigation happening automatically through all of the routes, which is a terrible UX.

Here’s a piece of the code for the routes:

public async navigateRoutes() {
    await this.navCtrl.navigateRoot([routes.root]);
    for (let i = 0; i < routes.history.length; i++) {
        await this.router.navigate([routing.history[i]]);
    }
 }

Thinking about it, what else I’d love how to know how to do is how to insert routes into router history, but only navigate to the last one.

Any thoughts?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49362

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>