Я не могу понять, почему вместо заполнителя внутри моего ввода я вижу [object Object]
;
Вот мой html :
<div class="input-form">
<input type="text" placeholder="Type name here..." [(ngModel)]="newItem">
<button (click)="addItem()">Add new</button>
</div>
<ul>
<li *ngFor="let item of items">{{ item }}
<button (click)="deleteItem(item)" >Delete</button>
</li>
</ul>
А вот component.ts :
newItem = {};
items = [];
addItem() {
if (this.newItem !== null) {
this.items.push(this.newItem);
this.newItem = {};
}
}