angularMobile icon indicating copy to clipboard operation
angularMobile copied to clipboard

Using Angular Controllers: Local images not showing

Open mperez-bluechip opened this issue 10 years ago • 1 comments

Tried ng-src="img/{{item.shortname}}_tn.jpg" and src="img/{{item.shortname}}_tn.jpg" with no luck. Could this be an Angular issue, possibly in ionic.bundle.js?

In app.js:

.controller('ListController', ['$scope', '$http', function($scope, $http){ $http.get('js/data.json').success(function(data){ $scope.artists = data; }); }]);

mperez-bluechip avatar Jul 10 '16 21:07 mperez-bluechip

Fixed!

Change $scope.artists = data; To $scope.artists = data.artists;

mperez-bluechip avatar Jul 11 '16 22:07 mperez-bluechip