mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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:
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user