title: how to clear all list in ionic2
body: <p>I'm working in ionic 2 project, created swipe to delete each items working fine and also need click button delete all items How can I delete all items from a list in angular 2?</p>
  
  <pre><code>&lt;button ion-button clear&gt;Clear All&lt;/button&gt;    
  &lt;ion-item-sliding *ngFor="let note of notes"&gt;
            &lt;ion-item&gt;
                {{note.title}}
            &lt;/ion-item&gt;
            &lt;ion-item-options&gt;
                &lt;button (click)="deleteNote(note)" danger&gt;
                    &lt;ion-icon name="trash"&gt;&lt;/ion-icon&gt;
                &lt;/button&gt;
            &lt;/ion-item-options&gt;
          &lt;/ion-item-sliding&gt;
  </code></pre>
  
  <p>file.ts</p>
  
  <pre><code>constructor( public viewCtrl: ViewController ) { 
      this.notes = [
        { title: 'This is notification swipe to delete' },
        { title: 'This is notification swipe to delete' }    
        ];
    }
  deleteNote(note){
  
          let index = this.notes.indexOf(note);
  
          if(index &gt; -1){
              this.notes.splice(index, 1);
          }
      }
  </code></pre>