Added $promise & $resolved properties

[ngResource.$resource](http://docs.angularjs.org/api/ngResource.$resource) defines a `$promise` property and a `$resolve` property on the Resource.
This commit is contained in:
scottmcarthur
2014-02-15 09:06:02 +00:00
parent 1cbc6388ea
commit 1195fc6b5e
+11
View File
@@ -105,6 +105,10 @@ declare module ng.resource {
$delete(dataOrParams: any, success: Function): T;
$delete(success: Function, error?: Function): T;
$delete(params: any, data: any, success?: Function, error?: Function): T;
/** the promise of the original server interaction that created this instance. **/
$promise : ng.IPromise<T>;
$resolved : boolean;
}
/** when creating a resource factory via IModule.factory */
@@ -122,3 +126,10 @@ declare module ng {
factory(name: string, resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction<any>): IModule;
}
}
interface Array<T extends ng.resource.IResource<T>>
{
/** the promise of the original server interaction that created this collection. **/
$promise : ng.IPromise<Array<T>>;
$resolved : boolean;
}