UNPKG

angular-google-chart

Version:
22 lines (20 loc) 767 B
(function(){ angular.module('googlechart') .directive('agcOnClick', onClickDirective); function onClickDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject = ['args', 'chart', 'chartWrapper']; function callback(args, chart, chartWrapper){ scope.$apply(function (){ scope.$eval(attrs.agcOnClick, {args: args, chart: chart, chartWrapper: chartWrapper}); }); } googleChartController.registerChartListener('click', callback, this); } }; } })();