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
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(){
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
  'use strict';
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
  angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap'])
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
    .config(function ($routeProvider) {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
      $routeProvider
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
        .when('/', {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
          templateUrl: 'slideshow/slideshow.html',
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
          controller: 'slideshowCtrl'
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
        });
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    })
56
e38e9d5114ad propagate the split of ammicoApi service
rougeronj
parents: 39
diff changeset
    12
    .controller('slideshowCtrl', function($scope, ammicoApi){
e38e9d5114ad propagate the split of ammicoApi service
rougeronj
parents: 39
diff changeset
    13
    	$scope.slideshow = ammicoApi.booksSlides.query({idBook:'12', format:'json'}, function(data){
e38e9d5114ad propagate the split of ammicoApi service
rougeronj
parents: 39
diff changeset
    14
    		data = ammicoApi.sanitizeUrls(data);
39
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    15
    	});
56
e38e9d5114ad propagate the split of ammicoApi service
rougeronj
parents: 39
diff changeset
    16
    	$scope.book = ammicoApi.book.get({idBook:'12', format:'json'});
39
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    17
    });
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
})();