docs: add description and example to list and item

This commit is contained in:
Drew Rygh
2015-09-04 11:02:57 -05:00
parent 417343593b
commit 0f06573f2b
4 changed files with 64 additions and 34 deletions

View File

@@ -5,7 +5,22 @@ import {ItemPrimarySwipeButtons, ItemSecondarySwipeButtons} from './item-swipe-b
import {dom} from 'ionic/util';
/**
* TODO
* @name ionItem
* @classdesc
* Creates a list-item that can easily be swiped,
* deleted, reordered, edited, and more.
*
* @example
* ```html
* <ion-list>
* <ion-item *ng-for="#item of items" (^click)="itemTapped($event, item)">
* {{item.title}}
* <div class="item-note" item-right>
* {{item.note}}
* </div>
* </ion-item>
* </ion-list>
* ```
*/
@Component({
selector: 'ion-item,[ion-item]',
@@ -24,22 +39,7 @@ import {dom} from 'ionic/util';
})
export class Item {
/**
* @name ionItem
* @classdesc
* Creates a list-item that can easily be swiped,
* deleted, reordered, edited, and more.
*
* @example
* ```html
* <ion-list>
* <ion-item *ng-for="#item of items" (^click)="itemTapped($event, item)">
* {{item.title}}
* <div class="item-note" item-right>
* {{item.note}}
* </div>
* </ion-item>
* </ion-list>
* ```
* TODO
* @param {ElementRef} elementRef TODO
*/
constructor(elementRef: ElementRef) {