I am new to angular2. I am trying to understand how to use multiple in a particular template. I have gone though many QA here but couldn\
Solved myself. Done some small structural changes also. Route from Component1 to Component2 is done by a single . Component2 to Comonent3 and Component4 is done by multiple The resulting contents are :
Component1.html
Component2.html
In Two...Go to 3 ...
In Two...Go to 4 ...
The '/two' represents the parent component and ['three']and ['four'] represents the link to the respective children of component2
. Component3.html and Component4.html are the same as in the question.
router.module.ts
const routes: Routes = [
{
path: '',
redirectTo: 'one',
pathMatch: 'full'
},
{
path: 'two',
component: ClassTwo, children: [
{
path: 'three',
component: ClassThree,
outlet: 'nameThree'
},
{
path: 'four',
component: ClassFour,
outlet: 'nameFour'
}
]
},];