0
컨트롤러로 뷰에 이미지를로드하고 있습니다. 에도 불구하고렌더링보기 전에 데이터로드
%7B%7Bimage.thumbnail%7D%7D:1 GET http://localhost:9000/%7B%7Bimage.thumbnail%7D%7D 404 (Not Found)
오류를 가지고, 작동,하지만 난 그것을 제거하려고 : 내가보기를로드 할 때 다음과 같은 오류를 제외하고 그것은 작동합니다.
여기내가하고 있던 무엇 전에 :
컨트롤러 :
app.controller("WeddingGalerieCtrl", function($scope, $http) {
$http.get(url)
.then(function(response){
$scope.images=response.data;
console.log($scope.images);
});
})
보기 :
<ul class="list" >
<li lightgallery class="list-item" ng-repeat="image in images">
<a href="{{image.big}}">
<img class="img-responsive" src="{{image.thumbnail}}" alt="" />
</a>
</li>
</ul>
내가보기가 렌더링되기 전에 나의 데이터를로드하는 것 해결 기능을 추가하는 시도, 하지만 여전히 같은 오류가 있습니다. 나를 바보
.when('/gallery/wedding', {
templateUrl: 'views/gallery.html',
controller: 'WeddingGalerieCtrl',
css: ['../styles/galleries.css','../styles/lightgallery.css'],
resolve: {
images: function($http) {
return $http.get(url).then(function(response) {
return response.data;
});
}
}
})
app.controller("WeddingGalerieCtrl", function($scope, $http, images) {
$scope.images = images;
})