ionic-team / ionic-team/ionic-framework

router navigate with relativeTo parameter can only success once

未关闭
#17,638 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
package: angular type: bug
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

# Bug Report
**Ionic version:**

[x] **4.x**

**Current behavior:**

navigate to next page failed!
router navigate with 'relativeTo' parameters will only success once, after back, you can never enter target page you want.
**Expected behavior:**

should navigate to next page back and forth successfully everytime

**Steps to reproduce:**
**Related code:**

open a blank ionic project,
use codes below will navigate to next page successfully only ONCE, after click back, you can never enter again.
In success round, variable ret returned True. In failed round, ret is null. whereas open a blank raw Angular project, everything is running correctly. Only Ionic failed.
```
let ret = await this.router.navigate(["../test1page"], { relativeTo: this.route });
console.log("ret=", ret);
```

**Other information:**

Using a blank raw Angular 7 project, router is running correctly at the same condition!!!

**Ionic info:**

Ionic:

ionic (Ionic CLI) : 4.10.3 (/Users/avex/temp/ionic/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.2
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.4.0

System:

NodeJS : v10.13.0 (/usr/local/bin/node)
npm : 6.8.0
OS : macOS High Sierra
```
insert the output from ionic info here
```

贡献指南

打开贡献指南

调研方向

Start with a blank Ionic 4 project and reproduce the router.navigate call using '../test1page' and relativeTo: this.route, then compare it with the reported working Angular 7 project. Confirm that navigation still succeeds after going back and entering the target page repeatedly; the issue provides no source file or test location to inspect.

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。