Pagination with Sorting using ng Tables 2
£10-20 GBP
Pagado a la entrega
I've currently implemented pagination on my endpoint reflected with an ngtable on AngularJS. I'm attempting to implement sorting for both asc and dsc values. Due to pagination I am unable to retrieve more values which aren't originally loaded in the first page. I've been able to use my endpoint with the sorting function in place to search with the API:
/api/example?size=10&sort=name,asc
What I would like to happen is that when selecting the sortable option on the html it will pass into the value whether it's asc or desc.
$[login to view URL] = function () {
$[login to view URL] = new NgTableParams({}, {
counts: [10, 25, 50, 75],
getData: function (params) {
if ($[login to view URL] === false) {
getObject =
{
"collection": "sites",
"page": [login to view URL]() - 1,
"size": [login to view URL](),
"sort": [WHAT DO I PUT HERE]
};
[login to view URL](
getObject,
function (response) {
$[login to view URL] = [login to view URL];
$[login to view URL] = [login to view URL];
$[login to view URL] = [login to view URL]() ? $filter('orderBy')($[login to view URL], [login to view URL]())
: $[login to view URL] ;
$[login to view URL] = true;
$[login to view URL]();
},
function (response) {
//ERRROR
}
);
}
else {
$[login to view URL] = false;
}
[login to view URL]($[login to view URL]);
return $[login to view URL];
}
})
};
HTML:
<td data-title="'Name'" filter="{ name: 'text'}" sortable="'name'">
{{[login to view URL]}}
</td>
Nº del proyecto: #25896691
Sobre el proyecto
3 freelancers están ofertando un promedio de £18 por este trabajo
Hi, I am available to work on this project if you like you can discus with me in private message I start work asap.
Hi dear, I'm an expert AngularJS developer as well as I have strong knowledge using ngTable component. The answer you are looking for is very simpler, please just accept my offer and I'll show you the solution. Best re Más