Adding route path to router history

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?