import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { NoteListComponent } from './note-list/note-list.component';
import { NoteDetailComponent } from './note-detail/note-detail.component';
import { NoteFormComponent } from './note-form/note-form.component';

const routes: Routes = [
  { path: '', component: NoteListComponent },
  { path: 'new', component: NoteFormComponent },
  { path: ':id', component: NoteDetailComponent },
  { path: ':id/edit', component: NoteFormComponent }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class NotesRoutingModule { }
