Created
September 28, 2019 05:02
-
-
Save dujo-stack/b8be6f3871fdf990d25eecfc56ddf5ed to your computer and use it in GitHub Desktop.
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 { CommonModule } from '@angular/common'; | |
import { ArticlesComponent } from './components/articles/articles.component'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { ArticlesFormComponent } from './components/articles/articles-form.component'; | |
const routes: Routes = [ | |
{ path: '', component: ArticlesComponent, pathMatch: 'full'}, | |
{ path: 'article/new', component: ArticlesFormComponent }, | |
{ path: '**', redirectTo: '' } | |
]; | |
@NgModule({ | |
declarations: [], | |
imports: [ | |
CommonModule, RouterModule.forRoot(routes) | |
] | |
}) | |
export class AppRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment