mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Added typings for $templateRequest service
This commit is contained in:
23
angularjs/angular.d.ts
vendored
23
angularjs/angular.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user