Skip to content

Commit

Permalink
Merge pull request #3977 from samherrmann/add-missing-restangular-met…
Browse files Browse the repository at this point in the history
…hods

Add missing plain and clone method to restangular IElement
  • Loading branch information
vvakame committed Mar 29, 2015
2 parents e388653 + 300d874 commit 334f1ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions restangular/restangular-tests.ts
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions restangular/restangular.d.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 334f1ac

Please sign in to comment.