在highcharts工具提示中添加ng-click属性

时间:2017-07-25 05:24:13

标签: angularjs highcharts

我正在尝试在highcharts中返回格式化程序对象时添加ng-click属性:

formatter: function() {
 var item = "";
 if (this.series.name == fluidVsConsumerDaily.pondSelection.pondName) {
     item = angular.element('<a> Pond Volume Level: <b>' + this.y + '(BBL)</b></a>');
 } else {
     item = angular.element('<button ng-click="vCtrl.section.dashboard.fluidVsConsumerDaily.openFluidSourceModal(' + this.series.options.fluidSourceFacilityId + ')"> Fluid Source: <b>' + this.series.options.fluidSourceName + '</b> - ' + this.y + '(BBL) </button>');
 }
 var element = $compile(item)(vm);
 $scope.$digest();
 return element.html();
},

不幸的是,点击仍然不起作用。当我检查DOM时,会出现ng-click。

提前致谢。

0 个答案:

没有答案