Angular - Template-Driven Forms
You have this Angular module code:
You try to use
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
bootstrap: [AppComponent]
})
export class AppModule {}You try to use
[(ngModel)] in AppComponent template but get an error. What is the fix?