Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { RouterModule, Routes } from '@angular/router';
- import { AuthComponent } from './auth/auth.component';
- const appRoutes: Routes = [
- // Component load
- { path: '', component: AuthComponent },
- // Without Lazy / pre loaded child module
- { path: 'material2', redirectTo:'/material2', pathMatch:'full' },
- // Lazy loading to load child module
- { path: 'material', loadChildren: './material-practice/material-practice.module#MaterialPracticeModule' }
- ];
- @NgModule({
- imports: [
- RouterModule.forRoot(
- appRoutes,
- {
- enableTracing: true, // <-- debugging purposes only
- }
- )
- ],
- exports: [
- RouterModule
- ],
- providers: []
- })
Add Comment
Please, Sign In to add comment