How to pass parameters to callback function in Angular

encountered a problem with angular development. The framework tinyUi used by
provides a spinner component that needs to be initialized with a set of parameters. Html may look like this

<cti-spinner ng-repeat="item in list" id="options.id" name="options.name" onChange="options.change">
</cti-spinner>

js looks like this

            $scope.list= [{
                    id:1,
                    name: "tom",
                    change:function (event,value){
                         // id
                         // function(id);
                    }
                }];

I need to pass a parameter id (incrementing) to the callback function change of the spinner component, and $scope.list will change dynamically.

so I use a variable index to save the id value, and use indexPP

every time I push into $scope.list.
            $scope.list= [{
                    id:1,
                    name: "tom",
                    change:function (event,value){
                          function($scope.index);
                    }
                }];
            //  $scope.list.push(new_item)
            //  $scope.index PP;

but I quickly realized the problem. Change is always executed with the value after the last PP. I would like to ask you guys, is there any way I can send id to change?


I wonder if index came out of var when indexPP, close to find out?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1becc5e-312a7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1becc5e-312a7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?