Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

If using relative route, Back Button will cause all a link href point back to itself #713

Open

Description

@ionitron-bot

Original issue by @hkjeffchan on 2018-10-12T14:48:28Z

Bug Report

Ionic Info
ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.12
@angular-devkit/build-angular : 0.7.5
@angular-devkit/schematics : 0.7.5
@angular/cli : 6.1.5
@ionic/angular-toolkit : 1.0.0

Describe the Bug
Page A => Page B => Page A (by Page B back button), all the relative route link will point to itself

Related Code
This works:
<a [routerLink]="['/tabs', {outlets: {home: ['folder', folder.id] } }]" [routerDirection]="'forward'">{{folder.title}}</a>

This does not work after back button (work for the first time):
<a [routerLink]="['../', folder.id]" [routerDirection]="'forward'">{{folder.title}}</a>

The html copied from firefox after the back button, you can see ng-reflect-router-link and href mismatch:
<a _ngcontent-c2="" ng-reflect-router-direction="forward" ng-reflect-router-link="../,28" href="/tabs/(home:folder/18)">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions