List index and change in content

My html file is like:

`

Pending


Approved


Cancelled by Doctor


Cancelled by You

{{item.content}}

Cancel Apppointment `

I have this swipe list , with cancel appointment button which sends item.id 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 $item.id 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 item.id instead of $index of the list element ,
when I changed cancel_appointment(item.id) into cancel_appointment(item.id, $index) and $scope.items[$data].status = ‘3’; into $scope.notify[$data].status = ‘3’;
thing works like a charm.