import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { AuthGuardService } from './services/authGuard.service' ; const routes = [ { path : '' , redirectTo : 'login' , pathMatch : 'full' } , { path : 'members' , canActivate : [ AuthGuardService ] , loadChildren : './tabs/tabs.module#TabsPageModule' } , { path : 'login' , loadChildren : './public/login/login.module#LoginPageModule' } , ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes ) ] , exports : [ RouterModule ] } ) export class AppRoutingModule { }