Files
Adam Bradley c657bb6d6a alpha39 updates/hacks
Conflicts:
	ionic/components/search-bar/search-bar.ts
	ionic/config/decorators.ts
2015-10-07 14:57:58 -05:00

36 lines
835 B
TypeScript

import {Component, View, ElementRef, Renderer} from 'angular2/angular2';
/**
* Creates a list-item that can easily be swiped,
* deleted, reordered, edited, and more.
*
* @usage
* ```html
* <ion-list>
* <ion-item *ng-for="#item of items" (click)="itemTapped($event, item)">
* {{item.title}}
* <ion-note item-right>
* {{item.note}}
* </ion-note>
* </ion-item>
* </ion-list>
* ```
*/
@Component({
selector: 'ion-item,[ion-item]'
})
@View({
template:
'<ng-content select="[item-left]"></ng-content>' +
'<ng-content select="[item-right]"></ng-content>' +
'<ion-item-content>' +
'<ng-content></ng-content>'+
'</ion-item-content>'
})
export class Item {
constructor(elementRef: ElementRef, renderer: Renderer) {
renderer.setElementClass(elementRef, 'item', true);
}
}