Skip to content

Instantly share code, notes, and snippets.

@dujo-stack
Created September 28, 2019 05:02
Show Gist options
  • Save dujo-stack/b8be6f3871fdf990d25eecfc56ddf5ed to your computer and use it in GitHub Desktop.
Save dujo-stack/b8be6f3871fdf990d25eecfc56ddf5ed to your computer and use it in GitHub Desktop.
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