Angular 2+ and Observables: Can’t bind to ‘ngModel’ since it isn’t a known property of ‘select’

>= RC.5

The FormsModule needs to be imported to make ngModel available

@NgModule({
  imports: [BrowserModule /* or CommonModule */, 
  FormsModule, ReactiveFormsModule],
  ...
)}
class SomeModule {}

<= RC.4

In config.js add

'@angular/forms': {
  main: 'bundles/forms.umd.js',
  defaultExtension: 'js'
},

in main.ts add

import {provideForms, disableDeprecatedForms} from '@angular/forms';

bootstrap(App, [disableDeprecatedForms(),provideForms()])

Plunker example

See also

Leave a Comment