Skip to content

Instantly share code, notes, and snippets.

@SandeepThomas
Created September 13, 2018 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SandeepThomas/d35e86c48ac8b6de4a37c37361887f58 to your computer and use it in GitHub Desktop.
Save SandeepThomas/d35e86c48ac8b6de4a37c37361887f58 to your computer and use it in GitHub Desktop.
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