2017-03-18 09:24:08
Angular
, 2017-03-18 09:24:08

Anuglar 2 - is it possible to create a router inside a router?

The bottom line is this - there is a main router, it still has an authorization route and a route that goes to the main page of the HomeComponent component. But the problem is that there is a menu inside the component, it is designed as a separate NavComponent component, and it is necessary that when you click on a menu item, the necessary components are displayed in the main div, while others disappear. There was an idea to make this moment in the style of tabs at the layout stage, but this seems wrong to me. Is there a way to solve this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SergeyBugai, 2017-03-18
distortion

As I understand it, you need something like child-route, read here
https://angular.io/docs/ts/latest/guide/router.htm...

N
Nicholas, 2017-03-18
@healqq

There are nested states in both the standard router and ui-router.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question