<ion-view title="Accueil">
    <ion-content class="has-header">
        <ion-list>
            <label class="item item-input">
                <i class="icon ion-search placeholder-icon"></i>
                <input type="text" placeholder="Rechercher" ng-model="recherche" 
                on-hold="HomeCtrl.onGeste('hold')"
                on-tap="HomeCtrl.onGeste('tap')"
                on-double-tap="HomeCtrl.onGeste('doubletap')"
                on-touch="HomeCtrl.onGeste('touch')"
                on-release="HomeCtrl.onGeste('release')"
                on-drag="HomeCtrl.onGeste('drag')"
                on-swipe="HomeCtrl.onGeste('swipe')"
                >
            </label>
            <ion-item class="item-thumbnail-left" collection-repeat="note in HomeCtrl.notes | filter : recherche" ui-sref="tab.detail({id: note.id})">
                <img src="img/ionic.png">
                <h2>{{note.titre}}</h2>
                <p>{{note.description}}</p>
                <ion-option-button class="button-assertive" ng-click="HomeCtrl.deleteNote(note.id)">Supprimer</ion-option-button>
            </ion-item>
        </ion-list>
        <ion-infinite-scroll
            on-infinite="HomeCtrl.getNotes()"
            ng-if="HomeCtrl.plusDeDonneesDispo()"
            distance="1%">
        </ion-infinite-scroll>
    </ion-content>
</ion-view>