import { Component, OnInit } from '@angular/core';
import { TodoItem } from '../interfaces/todo-item';
selector: 'app-list-manager',
<app-input-button-unit (submit)="addItem($event)"></app-input-button-unit>
<li *ngFor="let todoItem of todoList">
<app-todo-item [item]="todoItem"></app-todo-item>
styleUrls: ['./list-manager.component.scss']
export class ListManagerComponent implements OnInit {
{title: 'install NodeJS'},
{title: 'install Angular CLI'},
{title: 'create new app'},
addItem(title: string): void {
this.todoList.push({ title });