I have a custom directive. In my html i write this:
<uploader action="/rest/file/create_from_form.json" success="writeFid()"></uploader>
What I need is to exec "success" attribute function passing some data that I get from my directive. I can exec "success" attribute function via
$scope.$eval($scope.success)
and in my "controller" I have this:
$scope.writeFid = function (data) {
console.log("Into writeFid");
console.log(data); //this is my problem: it is always undefined.
}
I can see (via console.log() messages) that "success" function is called but without passing "data".
I have tried to use
<uploader action="/rest/file/create_from_form.json" success="writeFid(data)"></uploader>
but it does not work.
So: how can i pass some type of $scope.data ?
Thanks.