Created
September 13, 2018 10:41
-
-
Save SandeepThomas/d35e86c48ac8b6de4a37c37361887f58 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
import { ModuleWithProviders } from '@angular/core'; | |
import { Routes, RouterModule } from '@angular/router'; | |
import { AuthGuard, SocketInitialize } from './shared/services/authguard.service'; | |
const APP_ROUTES: Routes = [ | |
{ path: '', loadChildren: './landing/landing.module#LandingModule' }, | |
{ path: 'home', loadChildren: './home/home.module#HomeModule', canActivate: [AuthGuard, SocketInitialize] }, | |
{ path: '**', redirectTo: '' } | |
]; | |
export const AppRouting: ModuleWithProviders = RouterModule.forRoot(APP_ROUTES); | |
/** | |
* Search root module router. | |
**/ | |
import { ModuleWithProviders } from '@angular/core'; | |
import { Routes, RouterModule } from '@angular/router'; | |
import { SearchComponent } from './search.component'; | |
const SEARCH_ROUTES: Routes = [ | |
{ path: '', component: SearchComponent }, | |
{ path: 'shipper', loadChildren: './search-shipper/search-shipper.module#SearchShipperModule' }, | |
{ path: 'carrier', loadChildren: './search-carrier/search-carrier.module#SearchCarrierModule' } | |
]; | |
export const SearchRouting: ModuleWithProviders = RouterModule.forChild(SEARCH_ROUTES); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment