0
這是我的代碼:NG重複:一個項目,只有源
app.js
$http.get("http://angularjs.uum.my/tt.json")
.success(function(response) {$scope.scrollItems = response;});
$http.get("http://angularjs.uum.my/tt2.json")
.success(function(response) {$scope.scrollItems2 = response;});
tt.json - 只有1元
tt2.json - 有兩個2個元素
- http://angularjs.uum.my/app/#/timetable2
問題是與頁沒有。 1,其中只存在一個元素,頁面呈現空列表,重複x次(其中x等於子元素的數量)
這是已知的錯誤嗎? 如果事先未知開發人員的元素數量,如何解決這個問題?
請幫助,謝謝你的時間。
謝謝。我應該更坦率地回答我的問題。我接受你的答案,但請看看這個問題:http://stackoverflow.com/questions/27090336/ng-repeat-one-item-only-source-xml – Iyas 2014-11-23 15:03:28