-
카테고리
-
세부 분야
프론트엔드
-
해결 여부
미해결
삭제코드 잘못된거같네요.
19.07.13 16:36 작성 조회수 161
6
return item.id === todo.id 부분 잘못됬어요.
$scope.remove = function(todo) {
var idx = $scope.todos.findIndex(function(item) {
return item.title === todo.title;
})
if(idx > -1) {
$scope.todos.splice(idx, 1);
}
}
답변을 작성해보세요.
0
답변 1