Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 函数在特定上下文中不起作用_Angularjs_Highcharts_Ng Grid - Fatal编程技术网

Angularjs 函数在特定上下文中不起作用

Angularjs 函数在特定上下文中不起作用,angularjs,highcharts,ng-grid,Angularjs,Highcharts,Ng Grid,调用附加到$scope的函数时,上下文出现问题 我正在尝试在ngGrid和highcharts之间建立双向交互。我可以点击ngGrid中的一行,并在highcharts中选择partner列,但不能选择visa。我可以通过相同范围的按钮选择ngGrid中的一行,但不能通过highcharts 请查看:您缺少对scope的调用。$apply()您应该修改突出显示单击函数,它会很好地工作 click: function (event) { $scope.selectRo

调用附加到
$scope
的函数时,上下文出现问题

我正在尝试在ngGrid和highcharts之间建立双向交互。我可以点击ngGrid中的一行,并在highcharts中选择partner列,但不能选择visa。我可以通过相同范围的按钮选择ngGrid中的一行,但不能通过highcharts


请查看:

您缺少对scope的调用。$apply()您应该修改突出显示单击函数,它会很好地工作

 click: function (event) {
              $scope.selectRow(this.data.indexOf(event.point));
               $scope.$apply();
            }