So I want to say Im new for Angular.
app.component.ts;
model = new Model();
addItem(value:string){
if(value!="")
{this.model.items.push(new TodoItems(value,false));}
model.ts;
export class TodoItems{
description;
action;
constructor(description: string,action: boolean){
this.description= description;
this.action = action;
}
}
app.component.html;
<input type="text" #buttonName class="form-control">
<div class="input-group-append">
<button class="btn btn-primary" (click)="addItem(buttonName.value); buttonName='';">Add</button>
</div>
How I can solve this error?