123456789101112131415 |
- (function(){
- 'use strict';
- app.factory('books.repository', function(webApi, $http){
- return {
- getBooks: _getBooks,
- getBookById: _getBookById
- }
- function _getBooks(){
- return $http.get(webApi.DOMAIN + '/api/v2/books')
- }
- function _getBookById(id){
- return $http.get(webApi.DOMAIN + '/api/v2/books/' + id)
- }
- })
- })()
|