teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

$scope.checks = checks.push(value.name); へ変更

2018/05/17 04:50

投稿

sato1108
sato1108

スコア14

title CHANGED
File without changes
body CHANGED
@@ -18,10 +18,9 @@
18
18
  var checks = [];
19
19
  angular.forEach($scope.fruits, function(value, index, array) {
20
20
  if (value.checked) {
21
- checks.push(value.checked);
21
+ $scope.checks = checks.push(value.name);
22
22
  console.log(value.name);
23
23
  }
24
- $scope.checks
25
24
  });
26
25
  }
27
26
  ```