Created
August 18, 2018 14:47
-
-
Save whisher/edce490770ad72e59acfcb41c4a3886a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Questo e app-routing | |
| const routes: Routes = [ | |
| { path: '', loadChildren: './features/blog/blog.module#BlogModule', data: { preload: false , animation: {page: 'home'}} }, | |
| { path: 'admin', loadChildren: './features/admin/admin.module#AdminModule', data: { preload: false, animation: {page: 'dashboard'} } }, | |
| { path: 'auth', loadChildren: './features/authentication/authentication.module#AuthenticationModule', data: { preload: false, animation: {page: 'login'} } }, | |
| { path: '**', redirectTo: '', pathMatch: 'full' } | |
| ]; | |
| @NgModule({ | |
| providers: [ AppPreloadingStrategy ], | |
| imports: [ RouterModule.forRoot(routes, { preloadingStrategy: AppPreloadingStrategy }) ], | |
| exports: [ RouterModule ] | |
| }) | |
| export class AppRoutingModule { } | |
| Questo e il blog-routing | |
| export const ROUTES: Routes = [ | |
| { | |
| path: '', component: BlogLayoutMainComponent, | |
| children: [ | |
| { | |
| path: '', | |
| pathMatch: 'full', | |
| redirectTo: 'home' | |
| }, | |
| { | |
| path: 'home', | |
| loadChildren: './home/home.module#BlogHomeModule' | |
| } | |
| ] | |
| } | |
| ]; | |
| @NgModule({ | |
| imports: [ | |
| RouterModule.forChild(ROUTES) | |
| ], | |
| exports: [RouterModule] | |
| }) | |
| export class BlogRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment