ionic-alpha-scroll

一款基于ionic的索引列表插件,类似于原生APP的通讯录页面、微信的联系人页面、汽车之家的汽车品牌页面等等,首字母进行索引然后滑动。

MIT License

Downloads
6
Stars
11
Committers
2

ionic-alpha-scroll

ionicAPP

github`ionic-alpha-scroll`

20171103

1@Yan Xiaodi

DEMO

DEMO https://github.com/zwq8299174/ionic-alpha-scroll-demo

1npm

npm install ionic-alpha-scroll --save

2app.module.ts

import { AlphaScrollModule } from 'ionic-alpha-scroll';
 @NgModule({
	 ...
	 imports: [
		...
		AlphaScrollModule.forRoot(),
		...
	]
})

1

<ion-alpha-scroll *ngIf="contacts.length>0"
	[listData]="contacts"
	key="name"
	[itemTemplate]="alphaScrollItemTemplate"
	[currentPageClass]="currentPageClass">
</ion-alpha-scroll>
<ng-template
	#alphaScrollItemTemplate
	let-item="item"
	let-currentPageClass="currentPageClass">
	<ion-item (click)="currentPageClass.onItemClick(item)">
		<h2>{{item?.name}}</h2>
	</ion-item>
</ng-template>

2

{
	id:"1",
	initial:"A",
	logo:"http://api.jisuapi.com/car/static/images/logo/300/1.png",
	name:"",
	parentid:"0"
}

initial

Api

listData

Array

key

itemTemplate

ng-template

currentPageClass

class

License

This content is released under the MIT License.

Package Rankings
Top 15.95% on Npmjs.org