Reputation:
I seem to be missing something in my code. Please assist! In my browser console, I'm seeing "Cannot read property 'name' of undefined"
Upvotes: 1
Views: 1186
Reputation: 21
in routing module you probably missed out routing conf check it once, as i got the same problem add {path:'new', component : RecipeEditComponent}
in recipe children
Upvotes: 1
Reputation: 1
use this in component.ts file import { ReactiveFormsModule } from '@angular/forms'... bczz you used rectiveform method in html code
Upvotes: 0
Reputation: 3423
You forgot to define reference #f
to your form, change as below:
<form [formGroup]="newUserForm" #f="ngForm" (ngSumbit)="createUser()">
Upvotes: 1