Can anyone tell me what I'm doing wrong here? Is it possible to interpolate the image array the way I'm trying to here? I know that the object is working, because the inkObject.header property interpolates fine to the page, but the array, which has an assortment of images, is not working for some reason... I'm not sure if if it won't allow you to pass an array like this, within the object, or if I'm just doing something wrong.
Thanks.
//Controller in app.js
app.controller('galleryCtrl', ['$scope', '$http','$location',
function ($scope, $http, $location) {
$scope.ink = {
header: "Personalized Ink Products",
imageArray: [
'ink-1.jpg',
'ink-2.jpg',
'ink-3.jpg',
'ink-4.jpg'
]
};
}]);
//my directive in app.js
app.directive('pictureGallery', function () {
return {
templateUrl: 'directives/picturegallery.html',
replace: true,
scope: {
inkObject: '='
}
}
});
//the template
<div class="top-space">
<h1>{{ inkObject.header }}</h1>
<div class="row">
<div class="col-xs-6 col-sm-4 col-md-4" ng-repeat="image in {{ inkObject.imageArray }}">
<a href="img/{{image}}" target="_blank">
<img ng-src="img/{{image}}" width="200px" height="200px"
class="img-responsive img-thumbnail bottom-space">
</a>
</div>
</div>
</div>
//the view
<picture-gallery ink-object="ink"> </picture-gallery>