--- 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'});
});
})();
--- 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 @@
-<h1>Ammico Application</h1>
-<p>Liste des books :</p>
-
-<ul class="row ">
- <li class="" ng-repeat="i in books">
- <div class="visites-list">
- <a class="visite" href="">{{ i.title }}</a>
- </div>
- </li>
-</ul>
\ No newline at end of file
+<h1>Ammico Application</h1>
\ No newline at end of file
--- 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 @@
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav" ng-controller="routeClassCtrl">
<li ng-class="{active:isActive('/')}"><a href="#/">Home</a></li>
+ <li ng-class="{active:isActive('/books')}"><a href="#/books">Books</a></li>
<li ng-class="{active:isActive('/gallery')}"><a href="#/gallery">Galerie</a></li>
<li ng-class="{active:isActive('/slideshow')}"><a href="#/slideshow">Diaporama</a></li>
</ul>