| author | ymh <ymh.work@gmail.com> |
| Wed, 08 Jan 2020 17:49:53 +0100 | |
| changeset 205 | 147583c43f0d |
| parent 106 | cb13a9009bf5 |
| permissions | -rw-r--r-- |
| 0 | 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 | 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 | 13 |
})(); |