
오늘은 - 삭제 + 추가 + 아이디찾기 + 체크박스 해서 ngclass로 해서 바뀌게 기능!!


// 0403 월꺼
addtodo() {
const lastitem = this.todos[this.todos.length - 1].id;
const newInput = {
id: lastitem + 1,
name: this.inputValue,
};
this.todos.push(newInput);
this.inputValue = '';
}
addtodo() {
const lastTodo = this.todos[this.todos.length - 1].id;
const newInput = [
this.todos.push({
id: lastTodo + 1,
title: this.inputValue,
}),
];
this.addtodo(newInput);
}