$scope.subjects = [
    "Computer Security", "Graphics and Multimedia",
    "Networks", "Computer Science and Engineering", "Game Design",
    "Programming", "Information Technology", "Software Engineering",
    "Technology Management", "Telecommunications", "Web Development",
    "Environmental Sciences", "Biology", "General", "Aviation",
    "Mathematics", "Engineering"];


<label class="concentration-label3" ng-repeat="subject in subjects">
  <input type="checkbox" name="concentrations" class="concentration-label3__input js-concentration-value" value="" data-mixpanel-subject="Design">
  <span class="concentration-label3__title" for="conc1">
    {{subject}}
    <span class="concentration-label3__title__checkmark4"></span>
  </span>
</label>



  问题:错误:ngRepeat:dupes Repeater中的重复密钥

最佳答案

尝试在ng-repeat中添加曲目:

<label class="concentration-label3" ng-repeat="subject in subjects track by $index">

关于javascript - ng-repeat重复问题,如果没有任何重复,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39436540/

10-12 02:00