Pagination with Sorting using ng Tables 2

Cerrado Publicado hace 3 años Pagado a la entrega
Cerrado 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>

Desarrollo Java Desarrollo de software Programación AngularJS

Nº del proyecto: #25896691

Sobre el proyecto

3 propuestas Proyecto remoto Activo hace 3 años

3 freelancers están ofertando un promedio de £18 por este trabajo

omera1

Hi, I am available to work on this project if you like you can discus with me in private message I start work asap.

£18 GBP en 1 día
(3 comentarios)
2.6
garyantoriano

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

£16 GBP en 1 día
(0 comentarios)
0.0
reeeza

Hi, I have fixed the issue .if you want i can show.

£21 GBP en 1 día
(0 comentarios)
0.0