我使用ngGrid作为实时数据。它没有任何问题,并以有意义的方式显示所有数据。现在,当我单击当前ngGrid中的一行时,我想要打开第二个表(或nggrid)。我想我需要点击。但是,它没有用。你能告诉我,我怎么解决它?
.html文件
<div ng-controller="controller1">
<h1>table1</h1>
<div class="gridStyle" ng-grid="gridOptions"></div>
</div>
.js文件
app.controller('controller1', function ($scope){
$scope.data = [];
$scope.loadById = function(row){
window.console && console.log(row.entity);
$window.location.href = 'newPage/?id=' + row.entity.id;
}
/* rest of the code, not related to this part */
$scope.gridOptions = {
data: 'data',
columnDefs: [{
field: 'id', DisplayName: 'id',
cellTemplate: '<div class="ngCellText" ng-class="col.colIndex()"><a ng-click="loadById(row)">{{row.getProperty(col.field)}}</a></div>'
}]
};`