user1383029
user1383029

Reputation: 2125

Ionic 4 router animation is not shown

I created a small Ionic 4 / Angular navigation example application with this tutorial: https://www.youtube.com/watch?v=Yx_xJ4m-JxE

Everything works fine except the router animation. A click on this item with routerDirection="forward" refreshs the whole page, instead of animating only the new page in.

<ion-menu-toggle auto-hide="false" *ngFor="let p of pages">
    <ion-item [href]="p.url" [class.active-item]="selectedPath === p.url" routerDirection="forward">
        <ion-label>
            {{ p.title }}
        </ion-label>
    </ion-item>
</ion-menu-toggle>

Do I have to install a package or enable routing animations somewhre?? I'm running the project with ionic serve.

Upvotes: 0

Views: 1717

Answers (1)

Kabir
Kabir

Reputation: 1479

Ionic 4 navigate works like angular 6+.

routerLink="/notifications"

or in your case routerLink="[p.url]"

Here you'll get more details.

Upvotes: 1

Related Questions