Type Error When I Am Updating Crud Table After Refreshing The Page In Angularjs
When I am
Solution 1:
Your error says that data doesn't exist on controller, so you just need to initialize vm.data at the top of your controller:
vm.data = {};
Here's plnkr: http://plnkr.co/edit/mnRGSmEk0q9N2dSazEHL?p=preview
Another solution would be to create data object when you're adding it:
vm.data= {
myid:id,
fname:vm.arr[i].fname,
lname:vm.arr[i].lname,
classs:vm.arr[i].classs,
age:vm.arr[i].age,
fees:vm.arr[i].fees,
};
Here's plnkr: http://plnkr.co/edit/TZmgPz2h02peBYaF0uyV?p=preview
Post a Comment for "Type Error When I Am Updating Crud Table After Refreshing The Page In Angularjs"