How to call controller function from directive?
问题 how to call controller function from directive? or howto access directive ng-model from controller? eg. I use angular ui bootstrap time component and when time change I need to notify calling function in controller. I think in general it's typical use case for two way communication between components. appControllers.controller('mainCtrl', ['$scope', function($scope) { $scope.changedTime = function(time) { alert(time); } }]).directive('timePicker',['$http', function($http) { return { restrict: