question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: href on ion-card / ion-item navigates and reloads the page

See original GitHub issue

Bug Report

Ionic version:

[x] 4.x

Current behavior:

Add an href attribute to the ion-card or ion-item component and when clicking you see the entire app navigate and reload.

Expected behavior:

The app should navigate without reloading

Steps to reproduce:

Related code:

Github Repo: https://github.com/AVatch/href-issue

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 5.1.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.5.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v11.5.0 (/usr/local/Cellar/node/11.5.0/bin/node)
   npm    : 6.9.0
   OS     : macOS Mojave

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AVatchcommented, Jun 30, 2019

Thanks @abennouna - it seems though that the ion-card component does not have the routerLink attribute defined for it, So it does not seem to behave like the ion-button example.

0reactions
ionitron-bot[bot]commented, Jul 31, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: href on ion-card / ion-item navigates and reloads ... - GitHub
Add an href attribute to the ion-card or ion-item component and when clicking you see the entire app navigate and reload. Expected behavior:...
Read more >
Navigating The ion-router-link Component - Ionic Framework
Use the ion-router-link component to navigate to a specified link. The router link can accept an href for location and a direction for...
Read more >
Ionic 5 keeps reloading same page after API subscription
Im calling an API that contain pagination. For pagination im using ngb-pagination. The request for API is the page number and the response...
Read more >
Ionic Responsive Design and Navigation for All Screens
Big screens: Present a custom navigation bar with links and dropdown box. The first part is achieved quite easily, as it looks like...
Read more >
How to Build Your First Ionic 6 App with API Calls
In our app we need 2 routes: /movies – Navigate to our first page which should display a list of trending movies; /movies/:id...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found