I'm trying to update a div with an image and a link when a certain function is called and updates the imagesobject.
Here's what I have:
<a ng-bind="images[0]" ng-href="{{images[0].link}}"><img ng-bind="images[0]" ng-src="{{images[0].url || '' }}"></a>
On the controller:
$scope.upload = function (file, pos) {
$scope.images[parseInt(pos)] = file;
$scope.images[parseInt(pos)].url = 'http://i.imgur.com/ik9xqXp.jpg?1'
};
This function is called when the user submits an image.
However, when the images object updates, instead of an image, I get the string "[object File]
What am I doing wrong?
images[0].urlreturns a string?ng-bind- I'm pretty sureng-srcdoes two-way binding already.