StacksJar
Made with π by Arif Shaikh with all Passion.
Solution:
import { FormsModule } from '@angular/forms';
[...]
@NgModule({
imports: [
[...]
FormsModule
],
[...]
})
Explaination:
In order to be able to use two-way data binding for form inputs you need to import the FormsModule
package in your Angular module.
For more information, see the Angular 2 official documentation here and the official documentation for forms.
This error often means that you haven't declared the directive "x" or haven't imported the NgModule to which "x" belongs.