1

As per this link i have used all the libs and functions but i can't see the pagination buttons as like above link demo.

I am loading data from the angularjs get method, After data retrieved i am showing this grid. Everything is working good but only pagination is not working.

Item per page is showing only pagination numbers only not showing.

This my HTML code:

<div grid-data id='test' grid-options="gridOptions" grid-actions="gridActions">
    <div class="row">
        <div class="col-md-3">
        </div>
        <div class="col-md-9 text-right">
            <form class="form-inline pull-right margin-bottom-basic">
                <div class="form-group">
                    <grid-pagination max-size="5" boundary-links="true" class="pagination-sm" total-items="paginationOptions.totalItems" ng-model="paginationOptions.currentPage" ng-change="reloadGrid()" items-per-page="paginationOptions.itemsPerPage"></grid-pagination>
                </div>
            </form>
        </div>
    </div>
    <table class="table media-table-data">
        <thead>
            <tr>
                <th class="sortable">
                    Media Type
                </th>
                <th sortable="title" class="sortable">
                    Media Name
                </th>
                <th class="sortable">
                    Created By
                </th>
                <th class="sortable">
                    Created Date
                </th>
                <th class="sortable">
                    Last Modified
                </th>
                <th class="sortable">
                    Status
                </th>
                <!-- <th class="st-sort-disable th-dropdown">
                                                <select class="form-control width-15"
                                                        filter-by="statusDisplay"
                                                        filter-type="select"
                                                        ng-model="status"
                                                        ng-change="filter()">
                                                    <option value="">All Statuses</option>
                                                    <option ng-repeat="option in statusOptions track by option.value"
                                                            value="{{option.value}}">{{option.text}}
                                                    </option>
                                                </select>

                                            </th> -->
                <th class="sortable">
                    Action
                </th>
            </tr>
        </thead>
        <tbody>
            <tr ng-show="!medialength">
                <td colspan="7" align="center">No Media Available</td>
            </tr>
            <tr grid-item>
                <td>
                    <a href="" ng-click="goToPlay(item.id,'member.play')">
                                                    <span class="filetype" ng-class="{'videofile': item.mediaType==1 || item.mediaType==3,'audiofile': item.mediaType==2}"></span>
                                            <!--         <span style="background:url ({{ item.thumbnail ? item.thumbnail : '/assets/images/grey.png' }})" ></span> -->


                                            <span class="media-thumbline" style="background:url({{ item.thumbnail ? item.thumbnail : '/assets/images/grey.png' }})"></span>
                                                    <span class="media-time">{{ item.mediaFileDuration | toMinSec }}</span>
                                                </a>
                </td>
                <td ng-bind="item.title"></td>
                <td ng-bind="userData.name"></td>
                <td>{{ item.createdAt | date : "MMM dd, yyyy" }}</td>
                <td>{{ item.updatedAt | date : "MMM dd, yyyy" }}</td>
                <td>
                    <label class="inprogresstext" ng-show="item.mediaStatus==1">
                        <i class="fas fa-sync fa-spin"></i> Upload inprogress</label>
                    <label class="inprogresstext" ng-show="item.mediaStatus==2">
                        <i class="fas fa-sync fa-spin"></i> Transcription inprogress</label>
                    <label class="completedtext" ng-show="item.mediaStatus==3">
                        <i class="fas fa-check-circle"></i> Completed</label>
                    <label class="failedtext" ng-show="item.mediaStatus==4">
                        <i class="fas fa-exclamation-triangle"></i> Upload Failed</label>
                    <label class="failedtext" ng-show="item.mediaStatus==5">
                        <i class="fas fa-exclamation-triangle"></i> Transcription Failed </label>
                </td>
                <td>
                    <div class="dropdown drop-position" title="more">
                        <a href="" class="vertical-more more-icon-button dropdown-toggle" data-toggle="dropdown"></a>
                        <ul class="dropdown-menu dropdwnicon-menu">
                            <li><a ng-href="{{item.mediaFile}}" download><i class="material-icons">file_download</i> Download</a></li>
                            <li><a ng-click="openeditModal(item)"><i class="material-icons">mode_edit</i>Edit</a></li>
                            <li><a ng-hide="item.mediaStatus==2 || !item.mediaStatus==1" ng-click="openDeleteModal(item)" title="Delete {{item.fileType == 2 ? 'Audio' : 'Video'}}"><i class="material-icons">delete</i>Delete</a></li>
                        </ul>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="col-lg-12 col-md-12 col-sm-12 table-footer-page" ng-if="medialength">
        <div class="pager-btn-section">
            <form class="form-inline">
                <div class="form-group">
                    <grid-pagination max-size="5" boundary-links="true" class="pagination-sm" total-items="paginationOptions.totalItems" ng-model="paginationOptions.currentPage" ng-change="reloadGrid()" items-per-page="paginationOptions.itemsPerPage"></grid-pagination>
                </div>
                <div class="form-group items-per-page">
                    <label for="itemsOnPageSelect2">Items per page:</label>
                    <select id="itemsOnPageSelect2" class="form-control input-sm" ng-init="paginationOptions.itemsPerPage = '10'" ng-model="paginationOptions.itemsPerPage" ng-change="reloadGrid()">
                        <option>10</option>
                        <option>25</option>
                        <option>50</option>
                        <option>75</option>
                    </select>
                </div>
            </form>
        </div>
    </div>
</div>

1 Answer 1

0

I forgot to add 'pagination' dependency injector in my module, Thats why pagination is not loaded. Now it's fixed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.