How do I use on-change?
opened this issue · comments
My cropped photo works and is written to $scope.croppedPhoto.
I can do:
<img data-ng-src="{{ croppedPhoto }}"/>
Which works fine. But I need the final photo to sit in: $scope.newCard.photo
How can I update $scope.newCard.photo
with $scope.croppedPhoto
every time the cropped image changes?
I've tried: on-change="(dataURI)" and then added this function. But all I get in the console is undefined
:
$scope.changedCrop = function(data) {
console.log(data);
}
So I had to go with $dataURI and not dataURI :-)