javascript - Edit all cells in a column in ng-handsontable + Angularjs -


i'm having trouble checking/unchecking cells in column in ng-handsontable. controller looks like:

$scope.items= [{},{},{},{}]; $scope.columns =      {       data: 'foo',       title: "<input type='checkbox' onclick='console.log(items)' class='foo'>,       type: 'checkbox',       renderer: $scope.checkboxrenderer     };  $scope.checkboxrenderer = function(instance, td, row, col, prop, value, cellproperties) {     handsontable.renderers.checkboxrenderer.apply(this, arguments);     if (value === true) {       td.style.background = '#59e817';     } else {       td.style.background= '#ff2400';     };     return td;   }; 

so far works color boxes checked in rows. checkbox in header can checked or unchecked can't connect anything. when try log items object console or call function defined in controller, error saying

$scope not defined 

or

items not defined 

how access variables in scope within checkbox in header?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -