Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのような1行のコードを持っています
$scope.selectItem.push(item['id']);
$scope.selectItem スプライスにitem['id']が存在するかどうかを確認したい。
任意のアイデア
別の可能な解決策:
if ($scope.selectItem.indexOf(item['id']) !== -1) // it exists