Giter Club home page Giter Club logo

ion-alphabet-scroll's Introduction

ion-alphabet-scroll

A list of similar contacts, which can quickly find items through the alphabetical index.

Installation

1.Use bower to install:

bower install ion-alphabet-scroll --save

2.Import javascript and css file into your index.html:

<script src="lib/ion-alphabet-scroll/src/ion-alphabet-scroll.js"></script>
<link href="lib/ion-alphabet-scroll/src/ion-alphabet-scroll.css" rel="stylesheet">

3.Import the ion-alphabet-scroll to your Ionic App

angular.module('app', [
  'ionic',
  'ion-alphabet-scroll'
]);

Usage

Add ion-alphabet-scroll into your template , but it 'must be under the ion-content'. #Example

<ion-alphabet-scroll ng-model="listModel"  key="keyName">
      <div>Name: {{item.name}}</div>
</ion-alphabet-scroll>

this ng-model is the model you would like to sort .

the key is the name of the key would like to order by.

ps:Don't set ion-content scroll='false' .

Configure

If you don't want to sort your data lists , you can set sort="false". Default is true .

<ion-alphabet-scroll ng-model="listModel"  key="keyName" sort="false">
      <div>Name: {{item.name}}</div>
</ion-alphabet-scroll>

At the same time, you can also adjust the location of the alpha sidebar, through the next few properties:

 1.header-height
 2.sub-header-height
 3.tab-height

the header-height is your app header height.Default is 48px.

the sub-header-height is the subHeader height.Default is 44px.

the tab-height is the bottom tab height.Default is 50px.

<ion-alphabet-scroll ng-model="listModel"  key="keyName" sort="false" header-height="48px">
      <div>Name: {{item.name}}</div>
</ion-alphabet-scroll>

ion-alphabet-scroll's People

Contributors

jarden-liu avatar

Stargazers

流君酱 avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

nklhtv jardenliu

ion-alphabet-scroll's Issues

This plugin prevents filtering!

In the X file;

data-ng-repeat="(letter, items) in sortedAlphabetList" ng-if="(items | filter:search).length>0"

and

ng-repeat="item in items | filter:search"

These codes must be included.

We take the codes through the Bower.io. Could you update the codes?

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.