client/app/components/app_service.js
author rougeronj
Fri, 22 May 2015 17:42:57 +0200
changeset 94 cb4cf30a1629
parent 93 4b167851ee7d
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('ammicoModels', ['ngRoute'])
    .factory('Book', function($resource, context) {
        var books = $resource(context.urls.ammicoUrl+'/books/:idBook', {idBook:'@id'});
        //return $resource('/api/posts/:id');
        return books;
    })
    .factory('Slide', function($resource, context) {
        return $resource(context.urls.ammicoUrl+'/slides/:idSlide', {idSlide:'@id'});
        //return $resource('/api/posts/:id');
    });
    
})();