Created
October 11, 2018 23:03
-
-
Save zkkmin/9c70e16456c93a6da099fcfdff616e8b to your computer and use it in GitHub Desktop.
App router for module
This file contains 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 { 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