I am sending a controller method to directive. I want to get parameter frpm direvtive like events.
var app = angular.module("app", []);
app.controller("outCtrl", function($scope){
$scope.callOut = function(pramFromDirective){
console.log(pramFromDirective);
}
})
app.directive("myDir", function(){
return {
restrict: "E",
scope: {
call: "&"
},
controller: function($scope){
$scope.call({message: 444});
}
}
})
I want to send a parameter to outCtrl.callOut() method. But it does not.