>= 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()])
See also