I'm new to angular and I was following this hero tutorial when I stumbled upon this error:
Type 'Event' is not assignable to type 'string'
I reproduced the error here.
I'm new to angular and I was following this hero tutorial when I stumbled upon this error:
Type 'Event' is not assignable to type 'string'
I reproduced the error here.
You are missing the FormsModule import in your AppModule.
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { FormsModule } from "@angular/forms";
import { AppComponent } from "./app.component";
import { HeroComponent } from "./hero/hero.component";
@NgModule({
imports: [BrowserModule, FormsModule],
declarations: [AppComponent, HeroComponent],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}