Added typings for $templateRequest service

This commit is contained in:
Stephen Feest
2014-10-01 15:42:32 +01:00
parent b6970132c4
commit 4d33523877

View File

@@ -1286,6 +1286,29 @@ declare module ng {
resourceUrlWhitelist(whitelist: any[]): void;
}
/**
* $templateRequest service
* see http://docs.angularjs.org/api/ng/service/$templateRequest
*/
interface ITemplateRequestService {
/**
* Downloads a template using $http and, upon success, stores the
* contents inside of $templateCache.
*
* If the HTTP request fails or the response data of the HTTP request is
* empty then a $compile error will be thrown (unless
* {ignoreRequestError} is set to true).
*
* @param tpl The template URL.
* @param ignoreRequestError Whether or not to ignore the exception
* when the request fails or the template is
* empty.
*
* @return A promise whose value is the template content.
*/
(tpl: string, ignoreRequestError?: boolean): IPromise<string>;
}
///////////////////////////////////////////////////////////////////////////
// Directive
// see http://docs.angularjs.org/api/ng.$compileProvider#directive