首页 > 解决方案 > 如何导航到保留矩阵参数的父路由?

问题描述

Angular应用程序中,我需要导航到保留矩阵参数的路由的父级。

我想要获得的是从到导航 http://localhost:4200/a/b;param1=xyz;param2=zxy/chttp://localhost:4200/a/b;param1=xyz;param2=zxy

但是当我尝试使用router.navigate('..',{relativeTo: this.route.url})我得到的内容进行导航时http://localhost:4200/a/b,路由参数b会丢失。

如何b从子路由导航回保持其参数不变?

标签: angular

解决方案


推荐阅读