Coder Social home page Coder Social logo

ng-simplepagination's People

Contributors

natarajakannan avatar startswithaj avatar svileng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ng-simplepagination's Issues

not working with "track by id"

<div ng-repeat="data in datas track by data.id | startFrom: pagination.page * pagination.perPage | limitTo: pagination.perPage" class="col col-md-4 col-sm-4">
       <-- stuff -->
</div>

Everything else is great. Thank you!

Action Final Page

I would like you to consider the action of the burden of the last page in your source code for example:

paginator.toFinalPage = function () {
         if (paginator.page! = null) {
           paginator.numPages paginator.page = -1;
         }
  };

Thank you for your contribution was very helpful to me.

limit pages shown?

Just an idea: if you have many pages - this sometimes happens - and you want to limit the number of pages shown, something like below might be useful:

paginationModule.filter('limitPages', function() {
  return function(input, paginator, total) {
    total = parseInt(total);
    var first = 0;
        var last = Math.min(paginator.numPages, total);

    if (total < paginator.numPages) {       
        var mid = total/2.0;
            if (paginator.page > paginator.numPages - mid) {
            last = paginator.numPages
            first = paginator.numPages-total
         } else {
             if (paginator.page+1 - mid > 0) {
                 first = paginator.page - Math.floor(mid);
                 last =  paginator.page + Math.ceil(mid);
             }
         }
     }
     for (var i = first; i < last; i++) {
          input.push(i);
     }
     return input;
   };
 });

This can be used like ng-repeat = "n in [] | limitpages:pag:7"

ng-if instead of ng-hide

In your Readme.md you tell to use ng-hide... This is not nice to the DOM!

My ng-if implementation of your module... (foundation 5 css)

<div class="row">
    <div class="large-12 small-12 columns">
        <ul class="pagination">
            <li ng-if="pagination.page != 0">
                <a href="#" ng-click="pagination.prevPage()">&lsaquo;</a>
            </li>
            <li ng-repeat="n in [] | range: pagination.numPages">
                <a href="#" ng-click="pagination.toPageId(n)">{{n + 1}}</a>
            </li>
            <li ng-if="pagination.page < (pagination.numPages - 1)">
                <a href="#" ng-click="pagination.nextPage()">&rsaquo;</a>
            </li>
        </ul>
    </div>
</div>

Add Version Information

Trying to add this component to rails-assets.org

Getting this error:
"ng-simplePagination has no versions defined. Please create an issue in component's repository."

Pages display

Hi,
Is there a way to limit number of links to pages? I have a data set that contains 600+ pages, as you can imagine, that pages list of links is quite long.

Just to clarify I'm talking about numeric list:

Back-button browser, remember pagination

Hi,
When you go back via the browser button after a simplePaginated list it doesn't remember the page you were. Is there a way to remember the page you were?

Like: list with 3 pages, clicked on second page, click item, go back in browser, open list on page 2.

Paging a long list

Hi,

It might be a simple question but I am not sure if Is possible to add a (...) in the middle of the page numbers? I want to avoid my page numbers to be visualized in more than one line when I have a long list.

I've seen something like that,

<li ng-repeat="pageNumber in pages track by $index" ng-class="{ active : pagination.current == pageNumber, disabled : pageNumber == '...' }">

In another model (http://plnkr.co/edit/Wtkv71LIqUR4OhzhgpqL?p=preview) but so far ng-simplePagination is being great for me and I think I don't need to change.

Thanks!

Need Help

i install it in bower components and my gulp serve is running, still when i try include it in the injector array in my app it gives me unknwon provider

where exactly should i include it

(function() {
'use strict';

angular
    .module('airsole')
    .controller('FrontBlogController', FrontBlogController);

FrontBlogController.$inject = ['$http','$state', '$sce','$scope', 'AuthService', '$rootScope', 'Notify','$localStorage', '$filter', 'pagination'];

function FrontBlogController($http, $state, $sce, $scope, AuthService, $rootScope, Notify, $localStorage , $filter, pagination) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.