Hello, I’m having some doubts about angular2 meteor in the Forms Validation part.
I’m following the tutorial below and I’m trying to implement some validations the same way I did with angular2-cli but I’m not getting it. The way that the form is developed in the tutorial does not accept the way that I develop in angular2-cli.
https://angular-meteor.com/tutorials/socially/angular2/routing-and-multiple-views
I am accustomed to doing the validation using [(ngModel)]=”party.name” .
When I implemente [(ngModel)]=”party.name” give me a erro modules.js:56193 EXCEPTION: Cannot read property 'name' of undefined
… when I implement the #name = “ngModel” also does not work [ERROR ->] #name = "ngModel"
How can I do form validation by following the tutorial ………below …… have any teaching tutorials?
How to validate the name of this form below using the alter danger?
<form [formGroup]="addForm" (ngSubmit)="addParty()">
<label>Name</label>
<input type="text" formControlName="name"> </form>
Thanks for attention.