Merge pull request #3977 from samherrmann/add-missing-restangular-methods

Add missing plain and clone method to restangular IElement
This commit is contained in:
Masahiro Wakame
2015-03-29 22:51:55 +09:00
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -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");
+2
View File
@@ -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;