var AccueilCtrl = function(FilmSvc, $state) {
    this.titre = "Bonjour Ionic !";
    this.films = FilmSvc.getLastFilms();

    this.afficherDetails = function(idFilm) {
        $state.go('detailsFilm', {idFilm: idFilm});
    };

    this.nbFilms = function() {
        if (this.films) {
            return this.films.length;
        }
        return 0;
    };
};