2

I'm using dir-paginate directive in my html and it is working fine when I apply it body of my page, but if I use this directive inside a popup window then the pagination always show 10 pages even if my data is of two pages. Below is my code

<table class="table table-bordered table-striped exectable" >
                    <tr>
                        <th>Category</th>
                        <th>Operation Type</th>
                        <th>Identifier</th>
                        <th>Field Name</th>
                        <th>Old Value</th>
                        <th>New Value</th>
                        <th><input type="checkbox" style="margin-right:5px;" id="executeAll" name="executeAll"/>Select</th>

                    </tr>
                    <tr dir-paginate="item in items|itemsPerPage:50">
                        <td>{{item.Category}}</td>
                        <td>{{item.OperationType}}</td>
                        <td>{{item.Identifier}}</td>
                        <td>{{item.FieldName}}</td>
                        <td>{{item.OldValue}}</td>
                        <td>{{item.NewValue}}</td>
                        <td><input type="checkbox" name="{{item.Category}}"></td>

                    </tr>

             </table>
             <dir-pagination-controls
       max-size="50"
       direction-links="true"
       boundary-links="true" >
    </dir-pagination-controls>
     </div>

Please let me know if I'm missing anything.

Arpit
  • 63
  • 1
  • 8
  • Can you show us the popup (modal?) invocation code? – George Kagan Mar 10 '16 at 08:23
  • 1
    I got the issue.. Actually I was loading multiple instances of dir-paginate in my template which was causing issues. It was taking the length of the first json. To resolve this issue I included pagination-id with my directive and it worked fine.. – Arpit Mar 10 '16 at 10:27

0 Answers0