From 4d3352387766b83656226ce3dcc9543ae4cbbd17 Mon Sep 17 00:00:00 2001 From: Stephen Feest Date: Wed, 1 Oct 2014 15:42:32 +0100 Subject: [PATCH] Added typings for $templateRequest service --- angularjs/angular.d.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index e4f04fbf5..7bc167284 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -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; + } + /////////////////////////////////////////////////////////////////////////// // Directive // see http://docs.angularjs.org/api/ng.$compileProvider#directive