0
OK, 여기에 해당하는 경우입니다. 격자가 있고, 마지막 열은이 행을 삭제하는 버튼이며, 행을 클릭하여 새 페이지로 이동해야합니다. 그러나 삭제 버튼을 클릭하면 새로운 페이지로 이동하게됩니다. 어떻게 그 고소를 해결할 수 있습니까? 감사! 컨트롤러에서그리드에서 행을 클릭하고 행의 단추를 충돌없이 클릭하는 방법?
:
$scope.gridOptions =
{
data: 'students',
columnDefs: [
{field: 'name', displayName: 'Name'},
{field: 'school', displayName: 'Name'},
{field: '', displayName: 'Delete', cellTemplate:
'<div class="ngCellText" ng-class="col.colIndex()">' +
'<a class="glyphicon glyphicon-remove" ng-click="deleteStudent(row)"></a></div>'}
]
};
$scope.deleteStudent = function(row) {....}
$scope.selectStuent = function(row) {$location.path(....)}
HTML에서 :
<div class="gridStyle" ng-grid="gridOptions" ng-click="selectStudent()"></div>