Angular2 If ngModel is used within a form tag, either the name attribute must be set or the form

I am getting this error from Angular 2 core.umd.js:5995 EXCEPTION: Uncaught (in promise): Error: Error in app/model_exposure_currencies/model_exposure_currencies.component.html:57:18 caused by: If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as ‘standalone’ in ngModelOptions. Example 1: <input [(ngModel)]=”person.firstName” name=”first”> Example 2: <input [(ngModel)]=”person.firstName” [ngModelOptions]=”{standalone: … Read more

Angular error: “Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input'”

This question’s answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. I’m using Angular 4 and I am getting an error in the console: Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’ How can I resolve this? 21 Answers … Read more

Can’t bind to ‘formControl’ since it isn’t a known property of ‘input’ – Angular2 Material Autocomplete issue

I am trying to use Angular Material Autocomplete component in my Angular 2 project. I added the following to my template. <md-input-container> <input mdInput placeholder=”Category” [mdAutocomplete]=”auto” [formControl]=”stateCtrl”> </md-input-container> <md-autocomplete #auto=”mdAutocomplete”> <md-option *ngFor=”let state of filteredStates | async” [value]=”state”> {{ state }} </md-option> </md-autocomplete> Following is my component. import {Component, OnInit} from “@angular/core”; import {ActivatedRoute, Router} … Read more