client/app/slideshow/slideshow_controller.js
author rougeronj
Thu, 02 Apr 2015 18:28:31 +0200
changeset 57 388b29d38b44
parent 56 e38e9d5114ad
child 67 bc8fb175f4d9
permissions -rw-r--r--
add authentication and controle of authentication before routing

(function(){
  'use strict';

  angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap'])
    .config(function ($routeProvider) {
      $routeProvider
        .when('/', {
          templateUrl: 'slideshow/slideshow.html',
          controller: 'slideshowCtrl'
        });
    })
    .controller('slideshowCtrl', function($scope, ammicoApi){
    	$scope.slideshow = ammicoApi.booksSlides.query({idBook:'12', format:'json'}, function(data){
    		data = ammicoApi.sanitizeUrls(data);
    	});
    	$scope.book = ammicoApi.book.get({idBook:'12', format:'json'});
    });
})();