UNPKG

angular-google-chart

Version:
22 lines (21 loc) 739 B
/* global angular */ (function(){ angular.module('googlechart') .directive('agcOnReady', onReadyDirective); function onReadyDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject=['chartWrapper']; function callback(chartWrapper){ scope.$apply(function (){ scope.$eval(attrs.agcOnReady, {chartWrapper: chartWrapper}); }); } googleChartController.registerWrapperListener('ready', callback, this); } }; } })();