Create service for AccountBalances and use it.
This commit is contained in:
18
src/accounts/accountBalances.service.ts
Normal file
18
src/accounts/accountBalances.service.ts
Normal file
@ -0,0 +1,18 @@
|
||||
// vim: set tw=80 ts=2 sw=2 sts=2 :
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { Restangular } from "ngx-restangular";
|
||||
|
||||
import { AccountBalances } from './accountBalances';
|
||||
|
||||
@Injectable()
|
||||
export class AccountBalancesService {
|
||||
constructor(
|
||||
private restangular: Restangular
|
||||
) {}
|
||||
|
||||
get(id: number): Observable<AccountBalances> {
|
||||
return this.restangular.one('account', id).one('balances').get();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user