I am trying to get data's leave details from server. When I click or reload the link (http://localhost/portal/getleaves) api request send two times in firebug.
Sample code attached here:
$http.get('/portal/api/leave/'+id).
success(function(data) {
var data = data.result;
$scope.tableParams = new ngTableParams({
page: 1, // show first page
count: 10, // count per page
sorting: {
name: 'asc' // initial sorting
}
}, {
total: data.length, // length of data
getData: function($defer, params) {
$defer.resolve(data);
}
});
});
Thanks.