# HG changeset patch # User rougeronj # Date 1427109999 -3600 # Node ID 2b508b65571a94f24832ce3cae05a474ae0196c1 # Parent c7dfe7185ef7a453e6a2f5e4cf19cc9f2e135e71 add routes for books and slides diff -r c7dfe7185ef7 -r 2b508b65571a client/app/app.js --- a/client/app/app.js Mon Mar 23 12:25:19 2015 +0100 +++ b/client/app/app.js Mon Mar 23 12:26:39 2015 +0100 @@ -1,18 +1,30 @@ (function(){ 'use strict'; - angular.module('ammico', [ 'ngRoute','ammicoHome', 'ammicoGallery', 'ammicoSlideshow', 'ammicoSearch', 'ammicoLogin', 'templates' ]) + angular.module('ammico', [ 'ngRoute','ammicoHome', 'ammicoBooks', 'ammicoSlides', 'ammicoSlideshow', 'ammicoSearch', 'ammicoAuth', 'templates' ]) .config(function($routeProvider) { $routeProvider. when('/', { controller: 'homeCtrl', templateUrl: 'home/home.html' }). - when('/gallery', { - controller: 'galleryCtrl', - templateUrl: 'gallery/gallery.html' + when('/books', { + controller: 'booksCtrl', + templateUrl: 'books/books.html' + }). + when('/books/:idBook', { + controller: 'bookCtrl', + templateUrl: 'books/book.html' }). - when('/slideshow/', { + when('/slides/:idSlide', { + controller: 'slidesCtrl', + templateUrl: 'slides/slides.html' + }). + when('/slides/edit/:idSlide', { + controller: 'slideEditCtrl', + templateUrl: 'slides/slides.html' + }). + when('/slideshow', { controller: 'slideshowCtrl', templateUrl: 'slideshow/slideshow.html' }). @@ -28,7 +40,7 @@ controller: 'slideshowCtrl', templateUrl: 'slideshow/slideshow.html' }). - when('/search/', { + when('/search', { controller: 'searchCtrl', templateUrl: 'search/search.html' }). @@ -36,7 +48,7 @@ controller: 'searchCtrl', templateUrl: 'search/search.html' }). - when('/login/', { + when('/login', { controller: 'loginCtrl', templateUrl: 'login/login.html' }). @@ -85,6 +97,7 @@ }); }; this.getResource = $resource(context.urls.ammicoUrl+'/:action', {action:'@action'}); + this.postResource = $resource(context.urls.ammicoUrl+'/:action', {action:'@action'}); }); })(); diff -r c7dfe7185ef7 -r 2b508b65571a client/app/home/home.html --- a/client/app/home/home.html Mon Mar 23 12:25:19 2015 +0100 +++ b/client/app/home/home.html Mon Mar 23 12:26:39 2015 +0100 @@ -1,10 +1,1 @@ -

Ammico Application

-

Liste des books :

- - \ No newline at end of file +

Ammico Application

\ No newline at end of file diff -r c7dfe7185ef7 -r 2b508b65571a client/app/index.html --- a/client/app/index.html Mon Mar 23 12:25:19 2015 +0100 +++ b/client/app/index.html Mon Mar 23 12:26:39 2015 +0100 @@ -21,6 +21,7 @@