Skip to content

Instantly share code, notes, and snippets.

@theoomoregbee
Created July 29, 2018 13:58
Show Gist options
  • Save theoomoregbee/aaf0e3e4925d2f1445d1b9bf19044d7b to your computer and use it in GitHub Desktop.
Save theoomoregbee/aaf0e3e4925d2f1445d1b9bf19044d7b to your computer and use it in GitHub Desktop.
Using route guard post
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { LoginComponent } from './login/login.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { APP_ROUTES } from './app.routes';
import { DashboardModule } from './dashboard/dashboard.module';
@NgModule({
declarations: [
AppComponent,
LoginComponent,
PageNotFoundComponent
],
imports: [
BrowserModule,
RouterModule.forRoot(APP_ROUTES),
DashboardModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment