angularjs - ng-table is not rendering pagination -


I am trying to use ng-table for endorsement in my table, although the table is completely render But pagination is unavailable in the table.

Controller

  startBlockUI ('Wait ..', 3); $ Http ({url: url, method: "POST", data: "", header: header}). The success (function (data, position, header, config) {//$scope.persons = data; // Assign $ Scope.persons here has been resolved as stopBlockUI (); if (data.Status = = "200") {$ scope.InProgressTaskList = data.Payload;}}). Error (function (data, position, header, config) {}); $ Scope.tableParams = New ngTableParams ({Page: 1, // Counting page before showing: 5 // count per page}, {total: $ scope.InProgressTaskList.length, // data length getData: function ($ Defer, params) {$ defer.resolve ($ scope.InProgressTaskList.slice ((params.page () - 1) * parameter coat (), parameters.page () * params.count ()));}});  

HTML

  & lt; Div square = "box-body no-padding" ng-cloak & gt; & Lt; P & gt; & Lt; Strong> Page: & lt; / Strong> {{TableParams.page ()}} & lt; / P & gt; & Lt; P & gt; & Lt; Strong & gt; Count on page: & lt; / Strong> {{TableParams.count ()}} & lt; / P & gt; & Lt; Table ng-table = "table param" class = "table-table-condensed" & gt; & Lt; Tbody & gt; & Lt ;! - & lt; Tr & gt; & Lt; Th & gt; Task & lt; / Th & gt; & Lt; Th & gt; Progress & lt; / Th & gt; & Lt; Th style = "width: 40px" & gt; Label & lt; / Th & gt; & Lt; / TR & gt; - & gt; & Lt; Tr ng-repeat = "subtask in these progress tasklist" & gt; & Lt ;! - & lt; Td ng-show = "IsMobile" & gt; {{SubTask.creationDate}} & lt; / Td> - & gt; & Lt; Td data-title = "'work'" & gt; {{SubTask.title}} & amp; Nbsp; & Lt; Period & gt; & Lt; An NG-Click = "OpenTemplateInstit Webpage (subTask.editId)" role = "button" Data-Toggle = "Model" & gt; & Lt; / A & gt; & Lt; / Span & gt; & Lt; Period & gt; & Lt; A ng-click = "deleteTemplateEditPageWithId (subTask.editId)" role = "button" Data-Toggle = "Model" & gt; & Lt; Font color = "red" & gt; Remove & lt; / Font & gt; & Lt; / A & gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; Td data-title = "'progress''> gt; div class =" progress xs "& gt; div style =" width: 55% "square =" progress-time-time-danger " & Gt; & lt; / div & gt; & lt; / div & gt; & lt; / td & gt; & lt; td data-title = "'label" "& gt; & Lt; Span class = "badge bg-red" & gt; 55% & lt; / Span & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Div & gt; & Lt ;! - /.box -body - & gt;  

All data files are appearing but it should reach 5 lines per page. But the snapshot of the same is not happening.

Enter image details here

< Div class = "post-text" itemprop = "text">

It looks like you are not reloading tableParams after receiving the data

  $ area    

TableParams.reload ()

here in this section:

  if (data.state == "200") {$ scope.InProgressTaskList = data payload; $ Scope.tableParams.reload (); }  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -