Sure it is. Just define the new route before the other profile route if you 
have a possible path collision; Angular will render the first route that 
matches. <https://angular.io/guide/router#wildcard-route>


On Wednesday, August 1, 2018 at 5:55:44 PM UTC+2, fr...@ugetit.eu wrote:
>
> Hi Guys,
>
> I'm working on my first angular app. I have one question about routing.
> I have a app-routing module set up like this:
>
> const routes: Routes = [
>   {
>     path: '', component: Layout2Component, canActivate: [AuthGuard], 
> pathMatch: 'full', children: [
>       { path: '', component: HomeComponent },
>     ]
>   },
>   { path: 'account', component: AccountLayoutComponent, loadChildren: 
> './pages/account/account.module#AccountModule' },
> ];
>
>
> The account-routing module is set up like this:
>
>
> @NgModule({
>   imports: [RouterModule.forChild([
>     { path: 'login', component: LoginComponent },
>     { path: 'reset-password', component: ResetPasswordComponent },
>     { path: 'recover-password', component: RecoverPasswordComponent },
>   ])],
>   exports: [RouterModule]
> })
>
> I want to add a route "account/profile" that uses the layoutComponent as 
> layout instead of the AccountLayoutComponent.
> Is this possible and how?
>
> Thanks!
>
> Frans
>
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to