AngularJS : How to pass data from directive to controllers function
问题 I'm trying to pass some data from directive into a function addTrackFromPicker in my controller. $scope.addTrackFromPicker = function (message) { console.log("addTrackFromPicker", message); }; Here what I have in my directive dir.directive('youtubeList', function($http, $timeout, YT_event){ return { restrict: 'E', scope: { search: '=', dial: '&' }, templateUrl: 'youtube-list.html', ... Here I want to call controllers function from my template and pass it item.id.$t as argument: <div class=