VERSION:
I am using Angular ui-grid version 3.0.0-RC.18 (http://ui-grid.info/).
PROBLEM
I want to implement a double-c
I've used Aquiles solution and reduced scopes just to appSCope, see here.
I've rewrite code to showInfo becomes to $scope:
$scope.showInfo = function(row) {
var modalInstance = $modal.open({
controller: 'InfoController',
templateUrl: 'ngTemplate/infoPopup.html',
resolve: {
selectedRow: function () {
return row.entity;
}
}
});
modalInstance.result.then(function (selectedItem) {
$log.log('modal selected Row: ' + selectedItem);
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});
}
At gridOptions just used appScope:
$scope.gridOptions = {
showFooter: true,
enableSorting: true,
multiSelect: false,
enableFiltering: true,
enableRowSelection: true,
enableSelectAll: false,
enableRowHeaderSelection: false,
selectionRowHeaderWidth: 35,
noUnselect: true,
enableGridMenu: true,
columnDefs: [{displayName:'Name',field:'name'},{displayName:'Gender',field:'gender'},{displayName:'Company',field:'company'}],
rowTemplate: ""
};
Too, I added columnDefs to show that rowTemplate don't interfere with grid rendering.