javascript - Client side pagination not showing with Smart Table -


problem

data loaded asynchronously , displayed correctly, pagination not appear. thank if can help.

html

<table st-safe-src="update" st-table="displayeditemlist" class="table table-striped table-bordered">     <thead>         <tr>             <th>field1</th>             <th>field2</th>         </tr>     </thead>     <tbody>         <tr ng-repeat="item in displayeditemlist">             <td>{{item.field1}}</td>             <td>{{item.field2}}</td>         </tr>     </tbody>     <tfoot>         <tr>             <td colspan="2" class="text-center">                 <div st-pagination="" st-items-by-page="10" st-displayed-pages="7"></div>             </td>         </tr>     </tfoot> </table> 

javascript

    $scope.itemlist = [];     $scope.displayeditemlist = [];     $scope.update = 0;      $scope.initialize = function ()     {         var d = new $.deferred();          itemservice.getitems().then(function (data) {             $scope.itemlist = data;             $scope.displayeditemlist = [].concat($scope.itemlist);             $scope.update++;             d.resolve();         });          return d;     } 

alternative tried

... same result.

    <table st-safe-src="itemlist" ... 

in controller, need fill in st-safe-src (update), not displayeditemlist. mean, example

$scope.update = $scope.itemlist;  

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -