4
보조 경로없이 경로 정보를 얻는 방법은 무엇입니까? 시나리오는 보조 경로를 닫아서 현재 경로에서 보조 경로 정보를 제거하고 새 경로를 탐색하는 것입니다.각도 2 응용 프로그램의 보조 경로를 닫습니다.
그래서 내가 찾고있는 것은 aux1-route
을 현재 경로.
/route1(aux1:aux1-route;id=123) -> /route1
/route1(aux1:aux1-route;id=123//aux2:aux2-route) -> /route1(aux2:aux2-route)
app.html
<router-outlet></router-outlet>
<router-outlet name='aux1'></router-outlet>
<router-outlet name='aux2'></router-outlet>
경로 구성
{ path: "route1", component: route1Component }
{ path: "aux1-route", component: aux1RouteComponent, outlet: "aux1" }
{ path: "aux2-route", component: aux2RouteComponent, outlet: "aux2" }
Angular 2 version : 2.0.0-rc.5
Angular Router version : 3.0.0-rc.1
응용 프로그램의 어느 곳에서나 보조 경로를 종료 할 수있는 다른 방법이 있다면 제안하십시오.
미리 감사드립니다.
코드 아래 사용하여이 문제를 해결 할 수있었습니다! 이걸로 4 시간을 보냈다. – Weblurk
@Weblurk : 기꺼이 도와 줬어. –