2016-06-23 09:47:54 -07:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2016-10-19 21:41:04 +01:00
|
|
|
export type Ng1Token = string;
|
|
|
|
|
feat(upgrade): return a function (instead of array) from `downgradeInjectable()` (#14037)
This makes it more consistent with the dynamic version of `upgrade` and makes it
possible to share code between the dynamic and static versions.
This commit also refactors the file layout, moving common and dynamic-specific
files to `common/` and `dynamic/` directories respectively and renaming `aot/`
to `static/`.
Some private keys, used as AngularJS DI tokens, have also been renamed, but this
should not affect apps, since these keys are undocumented and not supposed to
be used externally.
BREAKING CHANGE:
Previously, `upgrade/static/downgradeInjectable` returned an array of the form:
```js
['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }]
```
Now it returns a function with an `$inject` property:
```js
factory.$inject = ['dep1', 'dep2', ...];
function factory(dep1, dep2, ...) { ... }
```
It shouldn't affect the behavior of apps, since both forms are equally suitable
to be used for registering AngularJS injectable services, but it is possible
that type-checking might fail or that current code breaks if it relies on the
returned value being an array.
2017-01-13 16:20:28 +02:00
|
|
|
export type Ng1Expression = string | Function;
|
|
|
|
|
2018-06-20 13:29:37 +03:00
|
|
|
export interface IAnnotatedFunction extends Function { $inject?: ReadonlyArray<Ng1Token>; }
|
2016-10-19 21:41:04 +01:00
|
|
|
|
|
|
|
export type IInjectable = (Ng1Token | Function)[] | IAnnotatedFunction;
|
|
|
|
|
2016-10-20 13:47:56 +03:00
|
|
|
export type SingleOrListOrMap<T> = T | T[] | {[key: string]: T};
|
|
|
|
|
2015-10-26 20:17:46 -07:00
|
|
|
export interface IModule {
|
2016-10-19 21:41:04 +01:00
|
|
|
name: string;
|
|
|
|
requires: (string|IInjectable)[];
|
|
|
|
config(fn: IInjectable): IModule;
|
|
|
|
directive(selector: string, factory: IInjectable): IModule;
|
2016-03-14 07:51:04 +01:00
|
|
|
component(selector: string, component: IComponent): IModule;
|
2016-10-19 21:41:04 +01:00
|
|
|
controller(name: string, type: IInjectable): IModule;
|
|
|
|
factory(key: Ng1Token, factoryFn: IInjectable): IModule;
|
|
|
|
value(key: Ng1Token, value: any): IModule;
|
2016-11-02 20:33:55 +00:00
|
|
|
constant(token: Ng1Token, value: any): IModule;
|
2016-10-19 21:41:04 +01:00
|
|
|
run(a: IInjectable): IModule;
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
|
|
|
export interface ICompileService {
|
2016-11-02 22:38:00 +00:00
|
|
|
(element: Element|NodeList|Node[]|string, transclude?: Function): ILinkFn;
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
|
|
|
export interface ILinkFn {
|
2016-10-19 21:41:04 +01:00
|
|
|
(scope: IScope, cloneAttachFn?: ICloneAttachFunction, options?: ILinkFnOptions): IAugmentedJQuery;
|
2017-07-05 13:58:27 +03:00
|
|
|
$$slots?: {[slotName: string]: ILinkFn};
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
|
|
|
export interface ILinkFnOptions {
|
|
|
|
parentBoundTranscludeFn?: Function;
|
|
|
|
transcludeControllers?: {[key: string]: any};
|
|
|
|
futureParentElement?: Node;
|
|
|
|
}
|
|
|
|
export interface IRootScopeService {
|
|
|
|
$new(isolate?: boolean): IScope;
|
|
|
|
$id: string;
|
2016-10-19 21:41:04 +01:00
|
|
|
$parent: IScope;
|
|
|
|
$root: IScope;
|
feat(upgrade): return a function (instead of array) from `downgradeInjectable()` (#14037)
This makes it more consistent with the dynamic version of `upgrade` and makes it
possible to share code between the dynamic and static versions.
This commit also refactors the file layout, moving common and dynamic-specific
files to `common/` and `dynamic/` directories respectively and renaming `aot/`
to `static/`.
Some private keys, used as AngularJS DI tokens, have also been renamed, but this
should not affect apps, since these keys are undocumented and not supposed to
be used externally.
BREAKING CHANGE:
Previously, `upgrade/static/downgradeInjectable` returned an array of the form:
```js
['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }]
```
Now it returns a function with an `$inject` property:
```js
factory.$inject = ['dep1', 'dep2', ...];
function factory(dep1, dep2, ...) { ... }
```
It shouldn't affect the behavior of apps, since both forms are equally suitable
to be used for registering AngularJS injectable services, but it is possible
that type-checking might fail or that current code breaks if it relies on the
returned value being an array.
2017-01-13 16:20:28 +02:00
|
|
|
$watch(exp: Ng1Expression, fn?: (a1?: any, a2?: any) => void): Function;
|
2016-11-02 20:33:55 +00:00
|
|
|
$on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
|
2016-04-16 13:46:53 +03:00
|
|
|
$destroy(): any;
|
feat(upgrade): return a function (instead of array) from `downgradeInjectable()` (#14037)
This makes it more consistent with the dynamic version of `upgrade` and makes it
possible to share code between the dynamic and static versions.
This commit also refactors the file layout, moving common and dynamic-specific
files to `common/` and `dynamic/` directories respectively and renaming `aot/`
to `static/`.
Some private keys, used as AngularJS DI tokens, have also been renamed, but this
should not affect apps, since these keys are undocumented and not supposed to
be used externally.
BREAKING CHANGE:
Previously, `upgrade/static/downgradeInjectable` returned an array of the form:
```js
['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }]
```
Now it returns a function with an `$inject` property:
```js
factory.$inject = ['dep1', 'dep2', ...];
function factory(dep1, dep2, ...) { ... }
```
It shouldn't affect the behavior of apps, since both forms are equally suitable
to be used for registering AngularJS injectable services, but it is possible
that type-checking might fail or that current code breaks if it relies on the
returned value being an array.
2017-01-13 16:20:28 +02:00
|
|
|
$apply(exp?: Ng1Expression): any;
|
2016-10-20 13:47:56 +03:00
|
|
|
$digest(): any;
|
2017-07-11 16:15:40 +03:00
|
|
|
$evalAsync(exp: Ng1Expression, locals?: any): void;
|
2016-10-19 21:41:04 +01:00
|
|
|
$on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
|
2015-10-26 20:17:46 -07:00
|
|
|
$$childTail: IScope;
|
|
|
|
$$childHead: IScope;
|
|
|
|
$$nextSibling: IScope;
|
2016-10-19 21:41:04 +01:00
|
|
|
[key: string]: any;
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
|
|
|
export interface IScope extends IRootScopeService {}
|
2016-12-27 14:55:58 -08:00
|
|
|
|
2016-10-19 21:41:04 +01:00
|
|
|
export interface IAngularBootstrapConfig { strictDi?: boolean; }
|
2015-10-26 20:17:46 -07:00
|
|
|
export interface IDirective {
|
|
|
|
compile?: IDirectiveCompileFn;
|
2016-10-19 21:41:04 +01:00
|
|
|
controller?: IController;
|
2015-10-26 20:17:46 -07:00
|
|
|
controllerAs?: string;
|
2016-10-19 21:41:04 +01:00
|
|
|
bindToController?: boolean|{[key: string]: string};
|
2016-06-08 16:38:52 -07:00
|
|
|
link?: IDirectiveLinkFn|IDirectivePrePost;
|
2015-10-26 20:17:46 -07:00
|
|
|
name?: string;
|
|
|
|
priority?: number;
|
|
|
|
replace?: boolean;
|
2016-10-19 21:41:04 +01:00
|
|
|
require?: DirectiveRequireProperty;
|
2015-10-26 20:17:46 -07:00
|
|
|
restrict?: string;
|
2016-10-19 21:41:04 +01:00
|
|
|
scope?: boolean|{[key: string]: string};
|
|
|
|
template?: string|Function;
|
|
|
|
templateUrl?: string|Function;
|
|
|
|
templateNamespace?: string;
|
2015-10-26 20:17:46 -07:00
|
|
|
terminal?: boolean;
|
2017-07-05 13:58:27 +03:00
|
|
|
transclude?: DirectiveTranscludeProperty;
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
2016-10-20 13:47:56 +03:00
|
|
|
export type DirectiveRequireProperty = SingleOrListOrMap<string>;
|
2017-07-05 13:58:27 +03:00
|
|
|
export type DirectiveTranscludeProperty = boolean | 'element' | {[key: string]: string};
|
2015-10-26 20:17:46 -07:00
|
|
|
export interface IDirectiveCompileFn {
|
|
|
|
(templateElement: IAugmentedJQuery, templateAttributes: IAttributes,
|
|
|
|
transclude: ITranscludeFunction): IDirectivePrePost;
|
|
|
|
}
|
|
|
|
export interface IDirectivePrePost {
|
|
|
|
pre?: IDirectiveLinkFn;
|
|
|
|
post?: IDirectiveLinkFn;
|
|
|
|
}
|
|
|
|
export interface IDirectiveLinkFn {
|
|
|
|
(scope: IScope, instanceElement: IAugmentedJQuery, instanceAttributes: IAttributes,
|
|
|
|
controller: any, transclude: ITranscludeFunction): void;
|
|
|
|
}
|
2016-03-14 07:51:04 +01:00
|
|
|
export interface IComponent {
|
2016-10-19 21:41:04 +01:00
|
|
|
bindings?: {[key: string]: string};
|
|
|
|
controller?: string|IInjectable;
|
2016-03-14 07:51:04 +01:00
|
|
|
controllerAs?: string;
|
2016-10-19 21:41:04 +01:00
|
|
|
require?: DirectiveRequireProperty;
|
|
|
|
template?: string|Function;
|
|
|
|
templateUrl?: string|Function;
|
2017-07-05 13:58:27 +03:00
|
|
|
transclude?: DirectiveTranscludeProperty;
|
2016-03-14 07:51:04 +01:00
|
|
|
}
|
2017-07-11 16:15:40 +03:00
|
|
|
export interface IAttributes {
|
|
|
|
$observe(attr: string, fn: (v: string) => void): void;
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
2015-10-26 20:17:46 -07:00
|
|
|
export interface ITranscludeFunction {
|
|
|
|
// If the scope is provided, then the cloneAttachFn must be as well.
|
|
|
|
(scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;
|
|
|
|
// If one argument is provided, then it's assumed to be the cloneAttachFn.
|
|
|
|
(cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
|
|
|
|
}
|
|
|
|
export interface ICloneAttachFunction {
|
|
|
|
// Let's hint but not force cloneAttachFn's signature
|
|
|
|
(clonedElement?: IAugmentedJQuery, scope?: IScope): any;
|
|
|
|
}
|
2016-10-19 21:41:04 +01:00
|
|
|
export type IAugmentedJQuery = Node[] & {
|
2017-07-18 20:16:04 +03:00
|
|
|
on?: (name: string, fn: () => void) => void;
|
2016-10-19 21:41:04 +01:00
|
|
|
data?: (name: string, value?: any) => any;
|
fix(upgrade): populate upgraded component's view before creating the controller (#14289)
Previously, the relative order of the AngularJS compiling/linking operations was
not similar to AngularJS's, resulting in inconsistent behavior for upgraded
components (which made upgrading to Angular less straight forward).
This commit fixes it, by following the compiling/linking process of AngularJS
more closely.
Main differences:
- The components view is already populated when the controller is instantiated
(and subsequent hooks are called).
- The correct DOM content is available when running the `$onChanges`, `$onInit`,
`$doCheck` hooks. Previously, the "content children" were still present, not
the "view children".
- The same for pre-linking.
- The template is compiled in the correct DOM context (e.g. has access to
ancestors). Previously, it was compiled in isolation, inside a dummy element.
For reference, here is the order of operations:
**Before**
1. Compile template
2. Instantiate controller
3. Hook: $onChanges
4. Hook: $onInit
5. Hook: $doCheck
6. Pre-linking
7. Collect content children
8. Insert compiled template
9. Linking
10. Post-linking
11. Hook: $postLink
**After**
1. Collect content children
2. Insert template
3. Compile template
4. Instantiate controller
5. Hook: $onChanges
6. Hook: $onInit
7. Hook: $doCheck
8. Pre-linking
9. Linking
10. Post-linking
11. Hook: $postLink
Fixes #13912
2017-03-07 19:32:52 +02:00
|
|
|
text?: () => string;
|
2016-10-19 21:41:04 +01:00
|
|
|
inheritedData?: (name: string, value?: any) => any;
|
|
|
|
contents?: () => IAugmentedJQuery;
|
|
|
|
parent?: () => IAugmentedJQuery;
|
|
|
|
empty?: () => void;
|
|
|
|
append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;
|
|
|
|
controller?: (name: string) => any;
|
|
|
|
isolateScope?: () => IScope;
|
2016-11-02 20:33:55 +00:00
|
|
|
injector?: () => IInjectorService;
|
2017-09-08 11:50:13 -07:00
|
|
|
remove?: () => void;
|
2018-02-15 19:21:18 +02:00
|
|
|
removeData?: () => void;
|
2016-10-19 21:41:04 +01:00
|
|
|
};
|
|
|
|
export interface IProvider { $get: IInjectable; }
|
|
|
|
export interface IProvideService {
|
|
|
|
provider(token: Ng1Token, provider: IProvider): IProvider;
|
|
|
|
factory(token: Ng1Token, factory: IInjectable): IProvider;
|
|
|
|
service(token: Ng1Token, type: IInjectable): IProvider;
|
|
|
|
value(token: Ng1Token, value: any): IProvider;
|
|
|
|
constant(token: Ng1Token, value: any): void;
|
|
|
|
decorator(token: Ng1Token, factory: IInjectable): void;
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
|
|
|
export interface IParseService { (expression: string): ICompiledExpression; }
|
2017-07-11 16:15:40 +03:00
|
|
|
export interface ICompiledExpression {
|
|
|
|
(context: any, locals: any): any;
|
|
|
|
assign?: (context: any, value: any) => any;
|
|
|
|
}
|
2015-10-26 20:17:46 -07:00
|
|
|
export interface IHttpBackendService {
|
|
|
|
(method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number,
|
|
|
|
withCredentials?: boolean): void;
|
|
|
|
}
|
|
|
|
export interface ICacheObject {
|
|
|
|
put<T>(key: string, value?: T): T;
|
|
|
|
get(key: string): any;
|
|
|
|
}
|
|
|
|
export interface ITemplateCacheService extends ICacheObject {}
|
feat(upgrade): return a function (instead of array) from `downgradeInjectable()` (#14037)
This makes it more consistent with the dynamic version of `upgrade` and makes it
possible to share code between the dynamic and static versions.
This commit also refactors the file layout, moving common and dynamic-specific
files to `common/` and `dynamic/` directories respectively and renaming `aot/`
to `static/`.
Some private keys, used as AngularJS DI tokens, have also been renamed, but this
should not affect apps, since these keys are undocumented and not supposed to
be used externally.
BREAKING CHANGE:
Previously, `upgrade/static/downgradeInjectable` returned an array of the form:
```js
['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }]
```
Now it returns a function with an `$inject` property:
```js
factory.$inject = ['dep1', 'dep2', ...];
function factory(dep1, dep2, ...) { ... }
```
It shouldn't affect the behavior of apps, since both forms are equally suitable
to be used for registering AngularJS injectable services, but it is possible
that type-checking might fail or that current code breaks if it relies on the
returned value being an array.
2017-01-13 16:20:28 +02:00
|
|
|
export interface ITemplateRequestService {
|
|
|
|
(template: string|any /* TrustedResourceUrl */, ignoreRequestError?: boolean): Promise<string>;
|
|
|
|
totalPendingRequests: number;
|
|
|
|
}
|
2016-10-19 21:41:04 +01:00
|
|
|
export type IController = string | IInjectable;
|
2015-10-26 20:17:46 -07:00
|
|
|
export interface IControllerService {
|
2016-10-19 21:41:04 +01:00
|
|
|
(controllerConstructor: IController, locals?: any, later?: any, ident?: any): any;
|
2015-10-26 20:17:46 -07:00
|
|
|
(controllerName: string, locals?: any): any;
|
|
|
|
}
|
|
|
|
|
2016-08-05 13:32:04 -07:00
|
|
|
export interface IInjectorService {
|
|
|
|
get(key: string): any;
|
|
|
|
has(key: string): boolean;
|
|
|
|
}
|
2015-10-26 20:17:46 -07:00
|
|
|
|
2017-05-16 18:03:25 -07:00
|
|
|
export interface IIntervalService {
|
|
|
|
(func: Function, delay: number, count?: number, invokeApply?: boolean,
|
|
|
|
...args: any[]): Promise<any>;
|
|
|
|
cancel(promise: Promise<any>): boolean;
|
|
|
|
}
|
|
|
|
|
2016-03-14 14:36:41 -07:00
|
|
|
export interface ITestabilityService {
|
|
|
|
findBindings(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
|
|
|
|
findModels(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
|
|
|
|
getLocation(): string;
|
|
|
|
setLocation(url: string): void;
|
|
|
|
whenStable(callback: Function): void;
|
|
|
|
}
|
|
|
|
|
2017-01-23 14:23:45 -05:00
|
|
|
export interface INgModelController {
|
|
|
|
$render(): void;
|
|
|
|
$isEmpty(value: any): boolean;
|
|
|
|
$setValidity(validationErrorKey: string, isValid: boolean): void;
|
|
|
|
$setPristine(): void;
|
|
|
|
$setDirty(): void;
|
|
|
|
$setUntouched(): void;
|
|
|
|
$setTouched(): void;
|
|
|
|
$rollbackViewValue(): void;
|
|
|
|
$validate(): void;
|
|
|
|
$commitViewValue(): void;
|
|
|
|
$setViewValue(value: any, trigger: string): void;
|
|
|
|
|
|
|
|
$viewValue: any;
|
|
|
|
$modelValue: any;
|
|
|
|
$parsers: Function[];
|
|
|
|
$formatters: Function[];
|
|
|
|
$validators: {[key: string]: Function};
|
|
|
|
$asyncValidators: {[key: string]: Function};
|
|
|
|
$viewChangeListeners: Function[];
|
|
|
|
$error: Object;
|
|
|
|
$pending: Object;
|
|
|
|
$untouched: boolean;
|
|
|
|
$touched: boolean;
|
|
|
|
$pristine: boolean;
|
|
|
|
$dirty: boolean;
|
|
|
|
$valid: boolean;
|
|
|
|
$invalid: boolean;
|
|
|
|
$name: string;
|
|
|
|
}
|
|
|
|
|
2015-10-26 20:17:46 -07:00
|
|
|
function noNg() {
|
|
|
|
throw new Error('AngularJS v1.x is not loaded!');
|
|
|
|
}
|
|
|
|
|
2017-04-14 11:25:56 -07:00
|
|
|
|
2016-11-12 14:08:58 +01:00
|
|
|
let angular: {
|
2017-07-11 16:15:40 +03:00
|
|
|
bootstrap: (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>
|
|
|
|
IInjectorService,
|
2016-06-08 16:38:52 -07:00
|
|
|
module: (prefix: string, dependencies?: string[]) => IModule,
|
2017-03-14 00:34:53 +00:00
|
|
|
element: (e: Element | string) => IAugmentedJQuery,
|
2017-04-14 14:40:56 -07:00
|
|
|
version: {major: number},
|
|
|
|
resumeBootstrap: () => void,
|
2016-06-08 16:38:52 -07:00
|
|
|
getTestability: (e: Element) => ITestabilityService
|
2017-04-14 11:30:12 -07:00
|
|
|
} = <any>{
|
|
|
|
bootstrap: noNg,
|
|
|
|
module: noNg,
|
|
|
|
element: noNg,
|
2018-02-15 19:21:18 +02:00
|
|
|
version: undefined,
|
2017-04-14 11:30:12 -07:00
|
|
|
resumeBootstrap: noNg,
|
|
|
|
getTestability: noNg
|
2016-06-08 16:38:52 -07:00
|
|
|
};
|
2015-10-26 20:17:46 -07:00
|
|
|
|
|
|
|
try {
|
|
|
|
if (window.hasOwnProperty('angular')) {
|
2017-04-14 11:30:12 -07:00
|
|
|
angular = (<any>window).angular;
|
2015-10-26 20:17:46 -07:00
|
|
|
}
|
|
|
|
} catch (e) {
|
2017-04-14 11:30:12 -07:00
|
|
|
// ignore in CJS mode.
|
2017-04-14 11:25:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-04-05 16:41:52 +01:00
|
|
|
* @deprecated Use `setAngularJSGlobal` instead.
|
2017-05-09 13:55:38 -04:00
|
|
|
*/
|
|
|
|
export function setAngularLib(ng: any): void {
|
|
|
|
setAngularJSGlobal(ng);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-04-05 16:41:52 +01:00
|
|
|
* @deprecated Use `getAngularJSGlobal` instead.
|
2017-05-09 13:55:38 -04:00
|
|
|
*/
|
|
|
|
export function getAngularLib(): any {
|
|
|
|
return getAngularJSGlobal();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Resets the AngularJS global.
|
2017-04-14 11:25:56 -07:00
|
|
|
*
|
2017-05-09 13:55:38 -04:00
|
|
|
* Used when AngularJS is loaded lazily, and not available on `window`.
|
2017-04-14 11:25:56 -07:00
|
|
|
*
|
2018-04-05 22:31:44 +01:00
|
|
|
*
|
2017-04-14 11:25:56 -07:00
|
|
|
*/
|
2017-05-09 13:55:38 -04:00
|
|
|
export function setAngularJSGlobal(ng: any): void {
|
2017-04-14 11:25:56 -07:00
|
|
|
angular = ng;
|
2018-02-15 19:21:18 +02:00
|
|
|
version = ng && ng.version;
|
2017-04-14 11:25:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-05-09 13:55:38 -04:00
|
|
|
* Returns the current AngularJS global.
|
2017-04-14 11:25:56 -07:00
|
|
|
*
|
2018-04-05 22:31:44 +01:00
|
|
|
*
|
2017-04-14 11:25:56 -07:00
|
|
|
*/
|
2017-05-09 13:55:38 -04:00
|
|
|
export function getAngularJSGlobal(): any {
|
2017-04-14 11:25:56 -07:00
|
|
|
return angular;
|
|
|
|
}
|
|
|
|
|
2017-04-14 11:30:12 -07:00
|
|
|
export const bootstrap =
|
2017-07-11 16:15:40 +03:00
|
|
|
(e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>
|
2017-04-14 11:30:12 -07:00
|
|
|
angular.bootstrap(e, modules, config);
|
2017-04-14 11:25:56 -07:00
|
|
|
|
2017-07-11 16:15:40 +03:00
|
|
|
export const module = (prefix: string, dependencies?: string[]) =>
|
2017-04-14 11:30:12 -07:00
|
|
|
angular.module(prefix, dependencies);
|
2017-04-14 11:25:56 -07:00
|
|
|
|
2017-07-11 16:15:40 +03:00
|
|
|
export const element = (e: Element | string) => angular.element(e);
|
2017-04-14 11:25:56 -07:00
|
|
|
|
2017-07-11 16:15:40 +03:00
|
|
|
export const resumeBootstrap = () => angular.resumeBootstrap();
|
2017-04-14 11:25:56 -07:00
|
|
|
|
2017-07-11 16:15:40 +03:00
|
|
|
export const getTestability = (e: Element) => angular.getTestability(e);
|
2015-10-26 20:17:46 -07:00
|
|
|
|
2018-02-15 19:21:18 +02:00
|
|
|
export let version = angular.version;
|