client/app/components/app_service.js
author rougeronj
Fri, 22 May 2015 17:41:19 +0200
changeset 93 4b167851ee7d
parent 0 cef349423167
child 99 c7c424e9eed5
permissions -rw-r--r--
Starting a better management of the 'models' and the requests


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