hormesiel · GitHub

Bug Report

Ionic version: 4.9.0

Current behavior:
When clicking on a ion-router-link whose href attribute contains a hash (e.g. /catalog#pens) the app doesn't navigate to the /catalog URL, and an error is printed to the console :

image

Expected behavior:
The app should navigate to the /catalog page and scroll down to the #pens anchor.

Related code:

// app-root.tsx
<ion-app>
  <ion-router useHash={false}>
    <ion-route url='/' component='home-page' />
    <ion-route url='/catalog' component='catalog-page' />
  </ion-router>
  <ion-nav animated={false} />
</ion-app>
// app-footer.tsx
<ion-router-link href='/catalog#pens'>Pens</ion-router-link>

Other information: It's a ionic-pwa Stencil app so I don't have the ionic CLI to provide additional info.

Read the original on github.com ↗