HOHO-๐Ÿšจ๐Ÿšจ๐Ÿšจ๐Ÿšจ๐Ÿšจ240401- ๋ณต์Šต// ๊ฐ€์žฅ ๋งŽ์ด ํ•˜๋Š” ์‹ค์ˆ˜

chan_hariยท2024๋…„ 7์›” 29์ผ

HOHO-DIARY

๋ชฉ๋ก ๋ณด๊ธฐ
11/56
post-thumbnail

๐Ÿšจ

// todo ๋ฆฌ์ŠคํŠธ ์ถ”๊ฐ€ ๋ฐ์‚ญ์ œ ๋ฒ„ํŠผ ๋ฐ ๋ฐฐ์—ดํ™•์ธํ•ด์„œ ํ•˜๋Š”๊ฒƒ ์•„์ด๋”” ์ฐพ๋Š”๊ฒƒ

 @for (addtodo of todo ; track $index) {
  <li>{{ addtodo.id }} | {{ addtodo.logname }}
todo: input[] = [
    {
      id: 0,
      logname: this.inputValue,
    },
  ];

input์˜ ๋ฐฐ์—ด์˜ ๋ณ€์ˆ˜๋ฅผ ์จ์ฃผ๋Š” ๊ฒƒ์ด์—ˆ์Œ

//์‚ญ์ œ ๋ฒ„ํŠผ

Parser Error: Missing expected ) at column 12 in [remove(item:input)] in c:/Users/admin/Desktop/projects/chanyoung/todo/src/app/pages/study/study.component.html@6:19ngtsc(-995002)

study.component.ts(9, 3):ย Error occurs in the template of component StudyComponent.

Parser Error: Unexpected token ')' at column 18 in [remove(item:input)] in c:/Users/admin/Desktop/projects/chanyoung/todo/src/app/pages/study/study.component.html@6:19ngtsc(-995002)

study.component.ts(9, 3):ย Error occurs in the template of component StudyComponent.

Property 'item' does not exist on type 'StudyComponent'.ngtsc(2339)

study.component.ts(9, 3):ย Error occurs in the template of component StudyComponent.



 remove(addtodo: input) {
    this.todo = this.todo.filter((item) => item.id !== addtodo.id);
  }

๋ ˆ์ „๋“œ

0๊ฐœ์˜ ๋Œ“๊ธ€