AngualrJs: do I require $scope in my controller for this?
问题 I am trying to emulate this Plunker, specifically adding a button to each row of an ag-grid. function ageClicked(age) { window.alert("Age clicked: " + age); } function ageCellRendererFunc(params) { params.$scope.ageClicked = ageClicked; return '<button ng-click="ageClicked(data.age)">Age</button>'; } Ag-grid calls ageCellRendererFunc to render the cell. It is generating some HTML to ender a button, which, when clicked will cause ageClicked to be called. That params.$scope.ageClicked =