Skip to content

Commit

Permalink
Added typings for $templateRequest service
Browse files Browse the repository at this point in the history
  • Loading branch information
smfeest committed Oct 1, 2014
1 parent b697013 commit 4d33523
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions angularjs/angular.d.ts
Expand Up @@ -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
Expand Down

0 comments on commit 4d33523

Please sign in to comment.