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

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

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