mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +08:00
docs(list): update doc example
This commit is contained in:
@ -52,11 +52,12 @@ export class List extends Ion {
|
|||||||
* Enable sliding items if your page has them
|
* Enable sliding items if your page has them
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
|
* import {Page, List} from 'ionic-angular';
|
||||||
|
* import {ViewChild} from 'angular2/core';
|
||||||
|
* @Page...
|
||||||
* export class MyClass {
|
* export class MyClass {
|
||||||
* constructor(app: IonicApp){
|
* @ViewChild(List) list: List;
|
||||||
* this.app = app;
|
* constructor(){}
|
||||||
* this.list = this.app.getComponent('my-list');
|
|
||||||
* }
|
|
||||||
* stopSliding(){
|
* stopSliding(){
|
||||||
* this.list.enableSlidingItems(false);
|
* this.list.enableSlidingItems(false);
|
||||||
* }
|
* }
|
||||||
@ -86,13 +87,12 @@ export class List extends Ion {
|
|||||||
* Enable sliding items if your page has
|
* Enable sliding items if your page has
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
|
* import {Page, List} from 'ionic-angular';
|
||||||
|
* import {ViewChild} from 'angular2/core';
|
||||||
|
* @Page...
|
||||||
* export class MyClass {
|
* export class MyClass {
|
||||||
* constructor(app: IonicApp){
|
* @ViewChild(List) list: List;
|
||||||
* this.app = app;
|
* constructor(){}
|
||||||
* this.list = this.app.getComponent('my-list');
|
|
||||||
* }
|
|
||||||
* // Here we have some method that will close the items
|
|
||||||
* // when called
|
|
||||||
* closeItmes(){
|
* closeItmes(){
|
||||||
* this.list.closeSlidingItems();
|
* this.list.closeSlidingItems();
|
||||||
* }
|
* }
|
||||||
|
Reference in New Issue
Block a user