Created
October 29, 2018 10:40
-
-
Save Hawksbillcat/113b46f12fa05e272c6d6c664f1fb3c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ion-list > | |
<ion-item-sliding *ngFor="let todo of todoList; let i = index;" > | |
<!-- <button ion-item (click)="detail(i)"> --> | |
<button ion-item detail-none (click)="detail(i)" > | |
<span>{{ todo.des }}</span> | |
<ion-icon name="checkmark" item-end *ngIf="todo.clicked"></ion-icon> | |
</button> | |
<ion-item-options> | |
<button class="red" (click)="delete(i)"> | |
<ion-icon name="trash"></ion-icon> | |
Delete | |
</button> | |
</ion-item-options> | |
</ion-item-sliding> | |
</ion-list> | |
<ion-buttons end > | |
<button (click)="restore()" ion-button icon-only ><ion-icon name="md-refresh"></ion-icon></button> | |
//------------------------------------------------------------------------------------------------------------------// | |
detail(index: number){ | |
for(let i =0;i<this.todoList.length;i++){ | |
if(i!=index){ | |
//this.tisClicked[i]=false; | |
this.dp.get_confirm_array()[i].clicked=false; | |
}else{ | |
this.dp.get_confirm_array()[i].clicked=true; | |
} | |
} | |
restore(){ | |
let idd=this.dp.getNumber_index(); | |
this.restoreArray=this.dp.get_confirm_array(); | |
this.restoreArray[idd].clicked=false; | |
//this.dp.set_confirm_array(this.restoreArray);有無加入都沒差 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment