I am currently working with a controller:
function ItemsController($scope, $http){
$scope.init = function(){
$scope.siteItems = [
{id:'1', path:'img/1.png'},
{id:'2', path:'img/2.png'}
];
}
};
and also have a view items.html:
<div class="row" ng-controller="ItemsController" ng-init="init()">
<div class="col-xs-6 col-md-3" ng-repeat="item in siteItems">
<a href="#/item/{{item.id}}" class="thumbnail">
<img src="{{item.path}}">
</a>
</div>
</div>
Every time I load the view within the ng-view, the list is initialized and ng-repeat generates two elements. However, {{item.path}} and {{item.id}} appear empty. I attempted using ng-src, but encountered the same issue. Using ng-bind works, although it's not my preferred method. Moving the content from items.html to the main index.html resolves the problem. Any ideas on what mistake I might be making?
EDITED:
A functional plunker example. On my own device, I wrote it as follows:
with the following result: