Skip to content

Instantly share code, notes, and snippets.

@zkkmin
Created October 11, 2018 23:03
Show Gist options
  • Save zkkmin/9c70e16456c93a6da099fcfdff616e8b to your computer and use it in GitHub Desktop.
Save zkkmin/9c70e16456c93a6da099fcfdff616e8b to your computer and use it in GitHub Desktop.
App router for module
import { NgModule } from '@angular/core';
import { RouterModule, Route } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { DashboardComponent } from './dashboard/dashboard.component';
const routes = [
{ path: 'login', component: LoginComponent },
{ path: 'dashboard', component: DashboardComponent }
]
@NgModule({
exports: [ RouterModule ],
imports: [ RouterModule.forRoot(routes)]
})
export class AppRoutingModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment