1

I'm using angular grid version 1.2.5. Here is my colDef in controller.

 var columnDefs = [
        {headerName: "ID", field: "osoba_id", width: 50, cellRenderer:  function(params) {
            if(typeof params.value !== 'undefined') {
                var a = document.createElement('a');
                var icon = document.createElement('i');
                icon.className = 'fa fa-eye';
                a.className = 'btn btn-info btn-xs';
                a.appendChild(icon);
                a.addEventListener('click', function () {
                     $scope.items = ['a','b','c'];

                 });
                return a;
            } return '';
        }},...];

But when I click on this cell, and call function to display data from $scope.items, it looks like $scope.items is empty. How to solve this?

0 Answers0