Matteo Scandolo | 035c593 | 2016-12-14 09:55:15 -0800 | [diff] [blame] | 1 | import {AppConfig} from '../../config/app.config'; |
| 2 | |
| 3 | export interface IXosResourceService { |
| 4 | getResource(): ng.resource.IResourceClass<any>; |
| 5 | } |
| 6 | |
| 7 | export class SlicesRest implements IXosResourceService { |
| 8 | static $inject = ['$resource']; |
| 9 | private resource: angular.resource.IResourceClass<any>; |
| 10 | |
| 11 | /** @ngInject */ |
| 12 | constructor( |
| 13 | private $resource: ng.resource.IResourceService |
| 14 | ) { |
| 15 | this.resource = this.$resource(`${AppConfig.apiEndpoint}/core/slices/`); |
| 16 | } |
| 17 | |
| 18 | public getResource(): ng.resource.IResourceClass<ng.resource.IResource<any>> { |
| 19 | return this.resource; |
| 20 | } |
| 21 | } |