I am getting and error why trying to use [(ngModel)]="message"
to build a form, the error I am getting is, Identifier 'message' is not defined
. The component declaration, template variable declarations, and element references do not contain such a member ng. I have imported {NgModule} from '@angular/core';
in the app.module.ts
so I can't see why it isn't working.
The code I an trying is:
<input
class="chatInput"
[(ngModel)]="message"
(keydown)="handleSubmit($event)"/>
<button class="chatButton" (click)=Send()></button>
Any help would be great, thank you .