Guest User

Untitled

a guest
Nov 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import { RouterModule, Routes } from '@angular/router';
  2. import { AuthComponent } from './auth/auth.component';
  3.  
  4. const appRoutes: Routes = [
  5. // Component load
  6. { path: '', component: AuthComponent },
  7.  
  8. // Without Lazy / pre loaded child module
  9. { path: 'material2', redirectTo:'/material2', pathMatch:'full' },
  10.  
  11. // Lazy loading to load child module
  12. { path: 'material', loadChildren: './material-practice/material-practice.module#MaterialPracticeModule' }
  13. ];
  14.  
  15.  
  16. @NgModule({
  17. imports: [
  18. RouterModule.forRoot(
  19. appRoutes,
  20. {
  21. enableTracing: true, // <-- debugging purposes only
  22. }
  23. )
  24. ],
  25. exports: [
  26. RouterModule
  27. ],
  28. providers: []
  29. })
Add Comment
Please, Sign In to add comment