bug: href on ion-card / ion-item navigates and reloads the page
See original GitHub issueBug 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:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @abennouna - it seems though that the
ion-card
component does not have therouterLink
attribute defined for it, So it does not seem to behave like theion-button
example.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.