client/app/slideshow/slideshow_controller.js
author rougeronj
Thu, 04 Jun 2015 20:12:49 +0200
changeset 116 6803d581ff19
parent 106 cb13a9009bf5
permissions -rw-r--r--
update config.tmpl and add auth_Jamespot (so jamespot can send us a jwt and log in automatically)

(function(){
    'use strict';

    angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap', 'ngTouch'])
    .controller('slideshowCtrl', function($scope, $routeParams, Slide, Book, Utils){
        $scope.slides = Slide.query({idBook:$routeParams.iSlide, format:'json'}, function(data){
            data.forEach(function(slide){
               slide = Utils.sanitizeUrls(slide);
            });
        });
        $scope.book = Book.get({idBook:$routeParams.iSlide, format:'json'});
    });
})();