Angular 2 – Router – Well usage of Depth first search (DFS)

One of the major module in angular 2 is router module, it will handle application navigation, authorization and application modularity.
Definition [Angular 2 router by @vsavkin]:
A router state is an arrangement of application components that defines what is visible on the screen.
Router is a tree of components, which will be navigable by user actions and based on URL segments it will move from one route to other route.
Sample routes: it’s an array of routes.

[{path: '', pathMatch: 'full', redirectTo: '/home'},
{ path: 'home', component: GoGreenAgriHome }
{ path: 'farms', component: AgriFarms },
{ path: 'agri-tech', component: AgriTech
children: [
{ path: ':id', component: AgriTechTypes}
]
}
]

A example code you can find at Github.