var HomeCtrl = function(NotesSvc, $scope, $timeout, $ionicSlideBoxDelegate) {
    this.titre = "Vidéo Ionic ENI";
    this.notes = [];
    this.nbNotes = 10;
    this.indexNotes = 0;
    this.loading = true;
    var self = this;

    this.getNotes = function() {
        this.notes = self.notes.concat(NotesSvc.getNotes(this.nbNotes, this.indexNotes));
        $scope.$broadcast('scroll.infiniteScrollComplete');
        this.indexNotes += this.nbNotes;
    };

    this.plusDeDonneesDispo = function() {
        console.log(this.indexNotes);
        if (this.indexNotes < 100) {
            return true;
        }
        return false;
    };

    this.deleteNote = function(id) {
        NotesSvc.deleteNote(id);
        this.notes = NotesSvc.getNotes();
    };

    this.onGeste = function(geste) {
        console.log(geste);
    };
};