client/app/slideshow/slideshow_controller.js
author rougeronj
Tue, 07 Apr 2015 12:00:14 +0200
changeset 74 44ebb0d0b836
parent 67 bc8fb175f4d9
child 99 c7c424e9eed5
permissions -rw-r--r--
get the book id of the book to delete from the template instead of $index (because we reorder the list so $index are not really clear anymore)

(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'});
	});
})();