fix(item-sliding): added [ion-item] as a selector so users can use a button inside with the ion-item attribute

references #513
This commit is contained in:
Brandy Carney
2015-11-13 18:20:20 -05:00
parent 050b600940
commit e287ef1029
2 changed files with 4 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ import {List} from '../list/list';
@Component({
selector: 'ion-item-sliding',
template:
'<ng-content select="ion-item"></ng-content>' +
'<ng-content select="ion-item,[ion-item]"></ng-content>' +
'<ng-content select="ion-item-options"></ng-content>'
})
export class ItemSliding {

View File

@@ -1,16 +1,16 @@
<ion-toolbar><ion-title>Sliding Items</ion-title></ion-toolbar>
<ion-content>
<ion-list id="myList">
<ion-item-sliding #item>
<ion-item text-wrap detail-push (click)="didClick($event, item)">
<button ion-item text-wrap (click)="didClick($event, item)">
<h3>Max Lynch</h3>
<p>
Hey do you want to go to the game tonight?
</p>
</ion-item>
</button>
<ion-item-options>
<button primary (click)="archive($event, item)">Archive</button>
<button danger (click)="del($event, item)">Delete</button>