Delete multiple items from firebase list

I want to delete items in my firebase list,I am able to it by selecting single item…but if I create a checkbox and try to delete multiple items which are checked…I am not abe to delete them,

This is what I have tried…

	    <ion-title>List files in firebase</ion-title>
	     <ion-buttons end>
      		<button ion-button clear (click)="openSharedFiles()">Shared Files</button>
		 <ion-buttons end>
		<button ion-button clear primary (click)="deletem()">Delete</button>
	 <ion-buttons end>
      <button ion-button (click)="selectClicked = !selectClicked" primary>Select</button>
<ion-content padding>

	<ion-refresher (ionRefresh)="doRefresh($event)">


      <div *ngIf="selectClicked">
        <ion-item *ngFor="let file of files|async" (click)="showOptions(file.$key, file)">
          <ion-label *ngIf="selectClicked">{{ }}</ion-label>
          <ion-checkbox [(ngModel)]="file.checked"></ion-checkbox>
      <div *ngIf="!selectClicked">
        <ion-item *ngFor="let file of files|async" (click)="showOptions(file.$key, file)">
          <h2 *ngIf="!selectClicked">{{ }}</h2>
          <h3 *ngIf="!selectClicked" ion-text color="primary">{{ file.modified|datepipe}}</h3>

	files: FirebaseListObservable<any>;

	this.userId = this.params.get('id');
	this.files = db.list('/'+this.userId+'/files');
		let confirm = this.alertCtrl.create({
			title: 'Delete file?',
			message: 'Do you want to delete?',
			buttons: [
			  text: 'Cancel',
			  handler: () => {
			    console.log('Cancel clicked');		    
			  text: 'Yes',
			  handler: () => {
			    console.log('Yes clicked');
		        let oldList = this.files;
                        let fileNames: Array<any> = [];
                        for(var i in oldList){
        	        if(oldList[i].checked == true){
                      let filesData = [];
                      for (let i in fileNames){ 



I am not getting any error here,but when I am clicking on delete button after selecting the files,no item gets deleted…

Please let me know where I am wrong…

Explain the logic behind this selectClicked please.

The intendation of your code is all over the place, making it very hard to read and understand. Could you fix this please?

the user can select multiple files,and if selectclicked,then that part of code will be executed like-
When the user clicks on select button on right side,following checkboxes appears-

and if !selectclicked,then the following is the output-

So not relevant for the problem at hand, right?
Did you test it without that additional logic and trim the problem down?