A have test application on angular. I try receive data from php page in my model. The response come with this command echo json_encode($arr);
from php file and has this format [{"id":"1","name":"first","text":"description"}]
. To receive this data in my model need to use only query cause .get give an error. My query in controller:
$scope.item = Items.query({id:$routeParams.id});
Now if I want to use this data in my model i need to specify my array item[0].name
Thats not problem but when i try to save edited data
$scope.item[0].$save({id:$scope.item[0].id});
i have an error TypeError: Object # has no method 'push'
What am I doing wrong?