【发布时间】:2014-01-29 11:45:55
【问题描述】:
我有一个图像列表,如果我使用 ng-repeat,则会出现 jQuery 错误 GET http:// SOME IP :8001/%7B%7Bimage%7D%7D 404 (NOT FOUND)
似乎 ng-repeate 创建了一个空图像?但是在 console.log 中没有空条目...
控制器:
appControllers.controller('remindersCtrl', ['$scope', '$http',
function($scope, $http){
console.log("reminders controller heyo");
var staticImgPath = "static/img/pages/reminders/"
$scope.reminderWastesTypes = [
staticImgPath + 'Biolski-odpadki.png',
staticImgPath + 'Embalaza.png',
staticImgPath + 'Ostali-odpadki.png',
staticImgPath + 'Papir.png',
staticImgPath + 'Steklo.png',
];
}]);
html
<ul rn-carousel class="image" rn-carousel-control attribute>
<li data-ng-repeat="image in reminderWastesTypes">
<img src="{{image}}">
</li>
</ul>
【问题讨论】:
标签: javascript jquery angularjs angularjs-ng-repeat