client/app/slideshow/slideshow_controller.js
author ymh <ymh.work@gmail.com>
Wed, 08 Jan 2020 17:49:53 +0100
changeset 205 147583c43f0d
parent 106 cb13a9009bf5
permissions -rw-r--r--
add poetry on sync
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
(function(){
99
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
     2
    'use strict';
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
106
cb13a9009bf5 improve slideshow interface and add ngTouch to handle swipe on mobile
rougeronj
parents: 99
diff changeset
     4
    angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap', 'ngTouch'])
99
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
     5
    .controller('slideshowCtrl', function($scope, $routeParams, Slide, Book, Utils){
106
cb13a9009bf5 improve slideshow interface and add ngTouch to handle swipe on mobile
rougeronj
parents: 99
diff changeset
     6
        $scope.slides = Slide.query({idBook:$routeParams.iSlide, format:'json'}, function(data){
99
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
     7
            data.forEach(function(slide){
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
     8
               slide = Utils.sanitizeUrls(slide);
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
     9
            });
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
    10
        });
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
    11
        $scope.book = Book.get({idBook:$routeParams.iSlide, format:'json'});
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
    12
    });
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
})();