Coder Social home page Coder Social logo

angular-pagination's Introduction

#angular-pagination

关于

  • 基于angular 编写的可复用分页指令

安装

  • 项目使用可以直接 bower install angular-paginationjs 下载 ,学习的同学可参照下面步骤
克隆项目到本地
git clone https://github.com/febobo/angular-pagination.git

要跑demo环境要求
node , bower , npm , gulp

安装
npm install && bower install

运行
gulp serve

使用

demo用法

html

<body ng-app="demo" ng-controller="demoCtro" class="row text-center">
    <div ui-pagination conf="conf"></div>
  </body>

js

var app = angular.module('demo' , ['pagination']);

  app.controller('demoCtro' , function($scope){

      $scope.title = 'pagination-directive';

      $scope.conf = {
        total : 1190,
        currentPage : 1,
        itemPageLimit : 1,
        isSelectPage : false,
        isLinkPage : false
      }

      // 监控你的页码 , 发生改变既请求
      $scope.$watch('conf.currentPage + conf.itemPageLimit' , function(news){
         // 把你的http请求放到这里
         console.log($scope.conf.currentPage , $scope.conf.itemPageLimit)
      })
  })

参数说明

total : Number list总条数 必填
currentPage : Number 当前页 必填
itemPageLimit : Number 一页展示多少条 选填 默认为10
itemSelectPage : 是否显示一页选择多少条下拉框 选填 默认为false展示
isLinkPage : 是否显示快速跳转框 选填 默认为false展示

Q&A

@febobo

angular-pagination's People

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.