client/app/slideshow/slideshow_controller.js
author rougeronj
Wed, 27 May 2015 19:02:43 +0200
changeset 99 c7c424e9eed5
parent 67 bc8fb175f4d9
child 106 cb13a9009bf5
permissions -rw-r--r--
refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
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
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
     4
    angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap'])
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){
c7c424e9eed5 refactor the ammicoApi service and put it into a specific module (ammicoCommon). Use factory to serve the resources
rougeronj
parents: 67
diff changeset
     6
        $scope.slideshow = Slide.query({idBook:$routeParams.iSlide, format:'json'}, function(data){
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
})();