mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Merge pull request #3977 from samherrmann/add-missing-restangular-methods
Add missing plain and clone method to restangular IElement
This commit is contained in:
@@ -82,6 +82,9 @@ myApp.controller('TestCtrl', (
|
||||
Restangular.one('accounts', 123).getList('buildings');
|
||||
Restangular.one('accounts', 123).getList<String>('buildings');
|
||||
|
||||
var accountData = Restangular.one('accounts', 123).plain();
|
||||
var accountClone: restangular.IElement = Restangular.one('accounts', 123).clone();
|
||||
|
||||
baseAccounts.getList().then(function (accounts) {
|
||||
var firstAccount = accounts[0];
|
||||
$scope.buildings = firstAccount.getList("buildings");
|
||||
|
||||
Vendored
+2
@@ -112,6 +112,8 @@ declare module restangular {
|
||||
trace(queryParams?: any, headers?: any): IPromise<any>;
|
||||
options(queryParams?: any, headers?: any): IPromise<any>;
|
||||
patch(queryParams?: any, headers?: any): IPromise<any>;
|
||||
clone(): IElement;
|
||||
plain(): any;
|
||||
withHttpConfig(httpConfig: IRequestConfig): IElement;
|
||||
save(queryParams?: any, headers?: any): IPromise<any>;
|
||||
getRestangularUrl(): string;
|
||||
|
||||
Reference in New Issue
Block a user