Recently a few customers have asked the same question:

We are using HTMLTreegrid with angularJS. We are expecting code snippet with angularJS.

In angularJS controller we are unable to call scope function which mentioned in previous mail.

 

At Angular contoller

 

$scope.saveStatus= function(rowData, column){

                var data='<div ><a href="javascript:void(0);" class="launchEditor" ng-click= "updateStatus('+rowData+')"><i class="fa fa-check"></i></a></div>';

         return data;

       

 }

 

 

 

Answer is to get scope from the item being clicked.  

For example:

myCompanyNameSpace.ItemRenderers_getNextHTML=function(item,column){

                       

            return "<img src='resources/app/assets/next.png' class='custom-hover' onclick='itemClickEvent(this)' title='Go to Item Info'>";

 

};

 

itemClickEvent =function(item){

        var scope = angular.element(document.getElementById("MainWrap")).scope();

                

        scope.$apply(function () {

              var itemObj = item.parentNode.component.data;

              console.log("itmeObj "+ itmeObj);

              scope.gotoItemInfo(itmeObj);

            });

};