0
爲什麼ng-repeat不能與給定的數據一起工作?我知道它與在數據之前加載的視圖有關。但是我根據用戶輸入填充selectedCourses數組,並且視圖顯示數組已填充,但是ng-repeat div卻什麼都沒有!請幫忙。ng-repeat不顯示信息
<br />
Matches {{ matches }}
<br />
hits {{ hits }}
<br />
selected Courses: {{selectedCourses}}
<br />
<div ng-repeat = "selCourse in selectedCourses" >
<h3> {{selCourse}} </h3>
</div>
<br />
<label class="control-label">Search Class to Add </label>
<input placeholder = "Enter a class" ng-model = "courseInput" type="text" class="form-control" id="courseInput">
所以HTML應重複selectedCourses數組作爲H3頭中的信息,但它顯示什麼! Check out this picture
是否需要重新加載視圖的ng-repeat部分?