I got empty data when I'm trying to read image data from the JSON file. I don't know what is missing. I have been writing this as a single file and it's work properly but when I'm using it with other files it's show nothing.
HTML
<body ng-app="myApp" ng-controller="myCtrl">
<div>
<div>
<div class="banner">
<ul id="lightSlider">
<li ng-repeat="image in images"><img ng-src="{{image.img}}"></li>
</ul>
</div>
</div>
</div>
JS
var app = angular.module('myApp', ['ui.router']);
app.controller('myCtrl', ["$scope", "$http", "$timeout" function($scope, $http, $timeout) {
$http.get('image.json')
.success(function(data, status, header, config) {
$scope.images = data.items;
})
$timeout(function() {
$("#lightSlider").lightSlider({
item: 1,
auto: true,
loop: true,
speed: 1000,
pause: 3000,
});
},0)
}]);