List index and change in content

My html file is like:




Cancelled by Doctor

Cancelled by You


Cancel Apppointment `

I have this swipe list , with cancel appointment button which sends to the cancel_appointment function , my controller.js is as below:

$scope.cancel_appointment = function ($data){

… //code for cancellation
$scope.items[$data].status = ‘3’;

After cancelation , I want status changed of relative list element e.g. if I cancel “8” number appointment , where $ is 8, then this item’s status should be “3” which means its status now its cancelled by user. I tried to use “$scope.items[$data].status = ‘3’;” which I know is incorrect , how can I update and refresh value into the list, or Do I have to reload complete list again ?

I was doing it mistake my list array is notify instead of items,
Plus I was sending instead of $index of the list element ,
when I changed cancel_appointment( into cancel_appointment(, $index) and $scope.items[$data].status = ‘3’; into $scope.notify[$data].status = ‘3’;
thing works like a charm.