小编Adh*_*res的帖子

Microsoft Edge在导航到角度2的路径后添加参数

我有一个表单被填充两个步骤,第一个表单填充对象的主要部分,第二个表单填充子部分.有一种方法可以从form2导航到form1,可以在Chrome和Firefox上运行,但是对于Microsoft Edge,它似乎添加了"/?object",这是我在代码中没做的事情.

我的按钮从form2返回到form1

<button class="btn btn-default pull-right" (click)="onCancel()">{{ 'button.back' | translate }}</button>
Run Code Online (Sandbox Code Playgroud)

我的方法onCancel()

onCancel() {
    this.goal.target = this.target;
    this.service.setGoalToSave(this.goal);
    if (this.isEditing) {
       this.router.navigate(['goals/goalForm', this.goal.goalId.toString()]);
    } else {
       this.router.navigate(['goals/goalForm']);
    }
}
Run Code Online (Sandbox Code Playgroud)

Microsoft Edge导航到

HTTP://本地主机:8080 /我的服务/ target01 = target02 = target03 = target04 = target05 = target06 = target07 = target08 = target09 = target10 = target11 = target12 = annualTarget =

但这不是一个有效的路线,因此它会重定向到我的主页面.

任何人都知道造成这种情况的原因或如何解决?

microsoft-edge angular2-routing angular

5
推荐指数
1
解决办法
1803
查看次数

标签 统计

angular ×1

angular2-routing ×1

microsoft-edge ×1