client/app/slideshow/slideshow_controller.js
author rougeronj
Fri, 22 May 2015 17:42:57 +0200
changeset 94 cb4cf30a1629
parent 67 bc8fb175f4d9
child 99 c7c424e9eed5
permissions -rw-r--r--
adding possibility to update the informations of a book (title, etc.) and handle 'idBook' parameters in Slide urls to send back only the slides of a book (will replace BooksSlides)

(function(){
	'use strict';

	angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap'])
	.controller('slideshowCtrl', function($scope, ammicoApi, $routeParams){
		$scope.slideshow = ammicoApi.booksSlides.query({idBook:$routeParams.iSlide, format:'json'}, function(data){
			data = ammicoApi.sanitizeUrls(data);
		});
		$scope.book = ammicoApi.book.get({idBook:$routeParams.iSlide, format:'json'});
	});
})();