Hi Adam,
this will work:
export const routes: Routes = [
{
path: 'home',
children: [
{
path: '',
pathMatch: 'full',
component: HomeComponent
},
{ path: 'prehistory', component: PrehistoryComponent },
{ path: 'ancient', component: AncientComponent }
]
},
{ path: '', redirectTo: '/home', pathMatch: 'full' }
];
The way your routing was set up, meant that the home component would be in
view all the time. if that was what you wanted, it needs its own
router-outlet.
You could not run it in stackBlitz because of the included node_modules
and dist folder. If you put something to GitHub, you must exclude those
folders or at least the node_modules.
Hope this helps,
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.