javascript - Pagination shown even though there is no data in angular -


here code:

buttons:

<li ><a data-ng-click="data1 = true;data2 = false; search.status = ''" href="">all projects</a></li> <li ><a data-ng-click="data2 = true;data1 = false" href="">notifications</a></li> 

populated data on click of button:

<ul>                                        <li ng-show="data1" dir-paginate="wd in workorderslist | filter: search.status | filter: search.name | itemsperpage: 10">         <a href="">             <h4>{{wd.name}}</h4>         </a>         <p>status: {{wd.status}}</p>     </li>      <li ng-show="data2">         <div ng-show="!notificationdatadashord.length">                 <span>no notifications</span>         </div>     </li> </ul> <dir-pagination-controls auto-hide="true"></dir-pagination-controls> 

inside controller:

$scope.data1 = true;  $scope.data2 = false; 

i using pagination directive link:

https://github.com/michaelbromley/angularutils/tree/master/src/directives/pagination

its problem dirpagination doesnt update collections after load data again.

see

https://github.com/michaelbromley/angularutils/issues/208

https://github.com/michaelbromley/angularutils/issues/137

as work around obviously

<dir-pagination-controls ng-show="data1" auto-hide="true"></dir-pagination-controls> 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -