@angular-wave/angular.ts 0.0.62 → 0.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +6 -2
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/angular.spec.js +13 -27
- package/src/animations/animate-css-driver.js +1 -1
- package/src/animations/animate-queue.js +9 -0
- package/src/animations/module.js +2 -2
- package/src/binding.spec.js +6 -3
- package/src/core/animate/animate.spec.js +1 -3
- package/src/core/cache/cache-factory.spec.js +2 -2
- package/src/core/compile/compile.js +0 -33
- package/src/core/compile/compile.spec.js +64 -104
- package/src/core/controller/controller.spec.js +2 -2
- package/src/core/cookie-reader.spec.js +2 -2
- package/src/core/filter/filter.spec.js +4 -4
- package/src/core/interpolate/interpolate.spec.js +2 -2
- package/src/core/interval/interval.spec.js +10 -7
- package/src/core/location/location.js +7 -0
- package/src/core/location/location.spec.js +2 -2
- package/src/core/ng-module.js +167 -0
- package/src/core/on.spec.js +2 -2
- package/src/core/parser/lexer.spec.js +11 -8
- package/src/core/parser/parse.spec.js +11 -8
- package/src/core/prop.spec.js +47 -35
- package/src/core/q/q.spec.js +6 -6
- package/src/core/root-element.spec.js +0 -2
- package/src/core/sce/sce.spec.js +7 -6
- package/src/core/scope/scope.spec.js +11 -8
- package/src/core/timeout/timeout.spec.js +10 -7
- package/src/directive/attrs/attrs.spec.js +4 -3
- package/src/directive/attrs/boolean.spec.js +2 -2
- package/src/directive/attrs/element-style.spec.js +4 -3
- package/src/directive/attrs/src.spec.js +7 -5
- package/src/directive/bind/bind.spec.js +10 -7
- package/src/directive/bind/bing-html.spec.js +2 -2
- package/src/directive/change/change.spec.js +2 -2
- package/src/directive/class/class.spec.js +2 -2
- package/src/directive/cloak/cloak.spec.js +2 -2
- package/src/directive/controller/controller.spec.js +2 -3
- package/src/directive/events/click.spec.js +2 -2
- package/src/directive/events/event.spec.js +16 -13
- package/src/directive/form/form.spec.js +11 -9
- package/src/directive/if/if.spec.js +2 -3
- package/src/directive/include/include.spec.js +11 -10
- package/src/directive/init/init.spec.js +3 -4
- package/src/directive/input/input.spec.js +10 -7
- package/src/directive/list/list.spec.js +2 -2
- package/src/directive/model/model.spec.js +11 -11
- package/src/directive/model-options/model-options.spec.js +11 -9
- package/src/directive/non-bindable/non-bindable.spec.js +10 -7
- package/src/directive/options/options.spec.js +10 -7
- package/src/directive/ref/href.spec.js +11 -8
- package/src/directive/ref/ref.spec.js +10 -7
- package/src/directive/repeat/repeat.spec.js +11 -10
- package/src/directive/script/script.spec.js +4 -3
- package/src/directive/select/select.spec.js +10 -7
- package/src/directive/show-hide/show-hide.spec.js +4 -3
- package/src/directive/style/style.spec.js +9 -6
- package/src/directive/switch/switch.spec.js +2 -2
- package/src/directive/validators/validators.spec.js +12 -9
- package/src/exts/aria/aria.js +2 -2
- package/src/exts/aria/aria.spec.js +2 -2
- package/src/exts/messages/messages.js +2 -2
- package/src/exts/messages/messages.spec.js +2 -2
- package/src/filters/filter.spec.js +4 -3
- package/src/filters/filters.spec.js +4 -3
- package/src/filters/limit-to.spec.js +4 -3
- package/src/filters/order-by.spec.js +7 -5
- package/src/index.js +2 -8
- package/src/injector.js +7 -0
- package/src/injector.spec.js +26 -29
- package/src/loader.js +133 -1126
- package/src/loader.md +142 -0
- package/src/loader.spec.js +5 -9
- package/src/public.js +113 -107
- package/src/public.spec.js +2 -4
- package/src/router/directives/state-directives.spec.js +0 -3
- package/src/router/directives/view-directive.spec.js +0 -6
- package/src/router/index.js +2 -2
- package/src/router/services.spec.js +0 -2
- package/src/router/state/state.spec.js +2 -4
- package/src/router/state-filter.spec.js +0 -2
- package/src/router/template-factory.spec.js +0 -2
- package/src/router/url/url-service.spec.js +0 -2
- package/src/router/view/view.spec.js +1 -2
- package/src/router/view-hook.spec.js +0 -2
- package/src/router/view-scroll.spec.js +0 -3
- package/src/services/http/http.spec.js +2 -2
- package/src/services/http/template-request.spec.js +3 -3
- package/src/services/http-backend/http-backend.spec.js +3 -2
- package/src/shared/jqlite/jqlite.js +20 -29
- package/src/shared/jqlite/jqlite.md +62 -0
- package/src/shared/jqlite/jqlite.spec.js +3 -4
- package/src/shared/min-err.spec.js +1 -2
- package/src/shared/test-utils.js +1 -1
- package/src/shared/utils.js +36 -2
- package/src/types.js +3 -4
- package/types/animations/animate-css-driver.d.ts +2 -1
- package/types/animations/animate-queue.d.ts +2 -1
- package/types/animations/module.d.ts +1 -1
- package/types/core/compile/compile.d.ts +0 -1
- package/types/core/location/location.d.ts +2 -1
- package/types/core/ng-module.d.ts +57 -0
- package/types/exts/aria/aria.d.ts +1 -1
- package/types/exts/messages/messages.d.ts +1 -1
- package/types/index.d.ts +0 -3
- package/types/injector.d.ts +7 -7
- package/types/loader.d.ts +69 -267
- package/types/public.d.ts +6 -1
- package/types/router/index.d.ts +1 -1
- package/types/shared/jqlite/jqlite.d.ts +5 -5
- package/types/shared/test-utils.d.ts +3 -2
- package/types/shared/utils.d.ts +20 -1
- package/types/types.d.ts +3 -3
package/types/loader.d.ts
CHANGED
|
@@ -1,196 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ngdoc directive
|
|
3
|
-
* @name ngApp
|
|
4
|
-
*
|
|
5
|
-
* @element ANY
|
|
6
|
-
* @param {import('./types').Module} ngApp an optional application
|
|
7
|
-
* {@link angular.module module} name to load.
|
|
8
|
-
* @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be
|
|
9
|
-
* created in "strict-di" mode. This means that the application will fail to invoke functions which
|
|
10
|
-
* do not use explicit function annotation (and are thus unsuitable for minification), as described
|
|
11
|
-
* in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in
|
|
12
|
-
* tracking down the root of these bugs.
|
|
13
|
-
*
|
|
14
|
-
* @description
|
|
15
|
-
*
|
|
16
|
-
* Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
|
|
17
|
-
* designates the **root element** of the application and is typically placed near the root element
|
|
18
|
-
* of the page - e.g. on the `<body>` or `<html>` tags.
|
|
19
|
-
*
|
|
20
|
-
* There are a few things to keep in mind when using `ngApp`:
|
|
21
|
-
* - only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
|
|
22
|
-
* found in the document will be used to define the root element to auto-bootstrap as an
|
|
23
|
-
* application. To run multiple applications in an HTML document you must manually bootstrap them using
|
|
24
|
-
* {@link angular.bootstrap} instead.
|
|
25
|
-
* - AngularJS applications cannot be nested within each other.
|
|
26
|
-
* - Do not use a directive that uses {@link ng.$compile#transclusion transclusion} on the same element as `ngApp`.
|
|
27
|
-
* This includes directives such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and
|
|
28
|
-
* {@link ngRoute.ngView `ngView`}.
|
|
29
|
-
* Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector},
|
|
30
|
-
* causing animations to stop working and making the injector inaccessible from outside the app.
|
|
31
|
-
*
|
|
32
|
-
* You can specify an **AngularJS module** to be used as the root module for the application. This
|
|
33
|
-
* module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It
|
|
34
|
-
* should contain the application code needed or have dependencies on other modules that will
|
|
35
|
-
* contain the code. See {@link angular.module} for more information.
|
|
36
|
-
*
|
|
37
|
-
* In the example below if the `ngApp` directive were not placed on the `html` element then the
|
|
38
|
-
* document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
|
|
39
|
-
* would not be resolved to `3`.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
*
|
|
43
|
-
* ### Simple Usage
|
|
44
|
-
*
|
|
45
|
-
* `ngApp` is the easiest, and most common way to bootstrap an application.
|
|
46
|
-
*
|
|
47
|
-
<example module="ngAppDemo" name="ng-app">
|
|
48
|
-
<file name="index.html">
|
|
49
|
-
<div ng-controller="ngAppDemoController">
|
|
50
|
-
I can add: {{a}} + {{b}} = {{ a+b }}
|
|
51
|
-
</div>
|
|
52
|
-
</file>
|
|
53
|
-
<file name="script.js">
|
|
54
|
-
angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
|
|
55
|
-
$scope.a = 1;
|
|
56
|
-
$scope.b = 2;
|
|
57
|
-
});
|
|
58
|
-
</file>
|
|
59
|
-
</example>
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
*
|
|
63
|
-
* ### With `ngStrictDi`
|
|
64
|
-
*
|
|
65
|
-
* Using `ngStrictDi`, you would see something like this:
|
|
66
|
-
*
|
|
67
|
-
<example ng-app-included="true" name="strict-di">
|
|
68
|
-
<file name="index.html">
|
|
69
|
-
<div ng-app="ngAppStrictDemo" ng-strict-di>
|
|
70
|
-
<div ng-controller="GoodController1">
|
|
71
|
-
I can add: {{a}} + {{b}} = {{ a+b }}
|
|
72
|
-
|
|
73
|
-
<p>This renders because the controller does not fail to
|
|
74
|
-
instantiate, by using explicit annotation style (see
|
|
75
|
-
script.js for details)
|
|
76
|
-
</p>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div ng-controller="GoodController2">
|
|
80
|
-
Name: <input ng-model="name"><br />
|
|
81
|
-
Hello, {{name}}!
|
|
82
|
-
|
|
83
|
-
<p>This renders because the controller does not fail to
|
|
84
|
-
instantiate, by using explicit annotation style
|
|
85
|
-
(see script.js for details)
|
|
86
|
-
</p>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div ng-controller="BadController">
|
|
90
|
-
I can add: {{a}} + {{b}} = {{ a+b }}
|
|
91
|
-
|
|
92
|
-
<p>The controller could not be instantiated, due to relying
|
|
93
|
-
on automatic function annotations (which are disabled in
|
|
94
|
-
strict mode). As such, the content of this section is not
|
|
95
|
-
interpolated, and there should be an error in your web console.
|
|
96
|
-
</p>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</file>
|
|
100
|
-
<file name="script.js">
|
|
101
|
-
angular.module('ngAppStrictDemo', [])
|
|
102
|
-
// BadController will fail to instantiate, due to relying on automatic function annotation,
|
|
103
|
-
// rather than an explicit annotation
|
|
104
|
-
.controller('BadController', function($scope) {
|
|
105
|
-
$scope.a = 1;
|
|
106
|
-
$scope.b = 2;
|
|
107
|
-
})
|
|
108
|
-
// Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,
|
|
109
|
-
// due to using explicit annotations using the array style and $inject property, respectively.
|
|
110
|
-
.controller('GoodController1', ['$scope', function($scope) {
|
|
111
|
-
$scope.a = 1;
|
|
112
|
-
$scope.b = 2;
|
|
113
|
-
}])
|
|
114
|
-
.controller('GoodController2', GoodController2);
|
|
115
|
-
function GoodController2($scope) {
|
|
116
|
-
$scope.name = 'World';
|
|
117
|
-
}
|
|
118
|
-
GoodController2.$inject = ['$scope'];
|
|
119
|
-
</file>
|
|
120
|
-
<file name="style.css">
|
|
121
|
-
div[ng-controller] {
|
|
122
|
-
margin-bottom: 1em;
|
|
123
|
-
-webkit-border-radius: 4px;
|
|
124
|
-
border-radius: 4px;
|
|
125
|
-
border: 1px solid;
|
|
126
|
-
padding: .5em;
|
|
127
|
-
}
|
|
128
|
-
div[ng-controller^=Good] {
|
|
129
|
-
border-color: #d6e9c6;
|
|
130
|
-
background-color: #dff0d8;
|
|
131
|
-
color: #3c763d;
|
|
132
|
-
}
|
|
133
|
-
div[ng-controller^=Bad] {
|
|
134
|
-
border-color: #ebccd1;
|
|
135
|
-
background-color: #f2dede;
|
|
136
|
-
color: #a94442;
|
|
137
|
-
margin-bottom: 0;
|
|
138
|
-
}
|
|
139
|
-
</file>
|
|
140
|
-
</example>
|
|
141
|
-
*/
|
|
142
|
-
export function angularInit(element: any): void;
|
|
143
|
-
/**
|
|
144
|
-
* @ngdoc type
|
|
145
|
-
* @name import('./types').Module
|
|
146
|
-
* @module ng
|
|
147
|
-
* @description
|
|
148
|
-
*
|
|
149
|
-
* Interface for configuring AngularJS {@link angular.module modules}.
|
|
150
|
-
*/
|
|
151
|
-
export function setupModuleLoader(window: any): any;
|
|
152
|
-
/**
|
|
153
|
-
* @ngdoc function
|
|
154
|
-
* @name angular.errorHandlingConfig
|
|
155
|
-
* @module ng
|
|
156
|
-
* @kind function
|
|
157
|
-
*
|
|
158
|
-
* @description
|
|
159
|
-
* Configure several aspects of error handling in AngularJS if used as a setter or return the
|
|
160
|
-
* current configuration if used as a getter. The following options are supported:
|
|
161
|
-
*
|
|
162
|
-
* - **objectMaxDepth**: The maximum depth to which objects are traversed when stringified for error messages.
|
|
163
|
-
*
|
|
164
|
-
* Omitted or undefined options will leave the corresponding configuration values unchanged.
|
|
165
|
-
*
|
|
166
|
-
* @param {Object=} config - The configuration object. May only contain the options that need to be
|
|
167
|
-
* updated. Supported keys:
|
|
168
|
-
*
|
|
169
|
-
* * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a
|
|
170
|
-
* non-positive or non-numeric value, removes the max depth limit.
|
|
171
|
-
* Default: 5
|
|
172
|
-
*
|
|
173
|
-
* * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated error url will
|
|
174
|
-
* contain the parameters of the thrown error. Disabling the parameters can be useful if the
|
|
175
|
-
* generated error url is very long.
|
|
176
|
-
*
|
|
177
|
-
* Default: true. When used without argument, it returns the current value.
|
|
178
|
-
*/
|
|
179
|
-
export function errorHandlingConfig(config?: any | undefined): {};
|
|
180
|
-
/**
|
|
181
|
-
* @type {string} `version` from `package.json`, injected by Rollup plugin
|
|
182
|
-
*/
|
|
183
|
-
export const VERSION: string;
|
|
184
1
|
/**
|
|
185
2
|
* Configuration option for AngularTS bootstrap process.
|
|
186
3
|
*
|
|
187
4
|
* @typedef {Object} AngularBootstrapConfig
|
|
188
|
-
* @property {boolean} debugInfoEnabled - Indicates whether debug information should be enabled. Setting this to `false` can improve performance but will disable some debugging features.
|
|
189
5
|
* @property {boolean} [strictDi] - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
|
|
190
6
|
*/
|
|
191
|
-
/**
|
|
192
|
-
* @class
|
|
193
|
-
*/
|
|
194
7
|
export class Angular {
|
|
195
8
|
/** @type {Map<number, import("./core/cache/cache").ExpandoStore>} */
|
|
196
9
|
cache: Map<number, import("./core/cache/cache").ExpandoStore>;
|
|
@@ -198,78 +11,81 @@ export class Angular {
|
|
|
198
11
|
version: string;
|
|
199
12
|
/** @type {typeof import('./shared/jqlite/jqlite').JQLite} */
|
|
200
13
|
element: typeof import("./shared/jqlite/jqlite").JQLite;
|
|
201
|
-
/** @type {
|
|
202
|
-
|
|
14
|
+
/** @type {!Array<string|any>} */
|
|
15
|
+
bootsrappedModules: Array<string | any>;
|
|
203
16
|
/** @type {Function} */
|
|
204
17
|
doBootstrap: Function;
|
|
205
18
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
*
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
bootstrap(element: string | Element | Document, modules?: Array<string | Function | any[]> | undefined, config?: AngularBootstrapConfig): any;
|
|
19
|
+
* Configure several aspects of error handling if used as a setter or return the
|
|
20
|
+
* current configuration if used as a getter.
|
|
21
|
+
*
|
|
22
|
+
* Omitted or undefined options will leave the corresponding configuration values unchanged.
|
|
23
|
+
*
|
|
24
|
+
* @param {import('./shared/utils').ErrorHandlingConfig} [config]
|
|
25
|
+
* @returns {import('./shared/utils').ErrorHandlingConfig}
|
|
26
|
+
*/
|
|
27
|
+
errorHandlingConfig(config?: import("./shared/utils").ErrorHandlingConfig): import("./shared/utils").ErrorHandlingConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Use this function to manually start up AngularJS application.
|
|
30
|
+
*
|
|
31
|
+
* AngularJS will detect if it has been loaded into the browser more than once and only allow the
|
|
32
|
+
* first loaded script to be bootstrapped and will report a warning to the browser console for
|
|
33
|
+
* each of the subsequent scripts. This prevents strange results in applications, where otherwise
|
|
34
|
+
* multiple instances of AngularJS try to work on the DOM.
|
|
35
|
+
* *
|
|
36
|
+
* <div class="alert alert-warning">
|
|
37
|
+
* **Note:** Do not bootstrap the app on an element with a directive that uses {@link ng.$compile#transclusion transclusion},
|
|
38
|
+
* such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and {@link ngRoute.ngView `ngView`}.
|
|
39
|
+
* Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector},
|
|
40
|
+
* causing animations to stop working and making the injector inaccessible from outside the app.
|
|
41
|
+
* </div>
|
|
42
|
+
*
|
|
43
|
+
* ```html
|
|
44
|
+
* <!doctype html>
|
|
45
|
+
* <html>
|
|
46
|
+
* <body>
|
|
47
|
+
* <div ng-controller="WelcomeController">
|
|
48
|
+
* {{greeting}}
|
|
49
|
+
* </div>
|
|
50
|
+
*
|
|
51
|
+
* <script src="angular.js"></script>
|
|
52
|
+
* <script>
|
|
53
|
+
* let app = angular.module('demo', [])
|
|
54
|
+
* .controller('WelcomeController', function($scope) {
|
|
55
|
+
* $scope.greeting = 'Welcome!';
|
|
56
|
+
* });
|
|
57
|
+
* angular.bootstrap(document, ['demo']);
|
|
58
|
+
* </script>
|
|
59
|
+
* </body>
|
|
60
|
+
* </html>
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param {string | Element | Document} element DOM element which is the root of AngularJS application.
|
|
64
|
+
* @param {Array<String|any>} [modules] an array of modules to load into the application.
|
|
65
|
+
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
|
66
|
+
* function that will be invoked by the injector as a `config` block.
|
|
67
|
+
* See: {@link angular.module modules}
|
|
68
|
+
* @param {AngularBootstrapConfig} [config] an object for defining configuration options for the application. The
|
|
69
|
+
* following keys are supported:
|
|
70
|
+
*
|
|
71
|
+
* * `strictDi` - disable automatic function annotation for the application. This is meant to
|
|
72
|
+
* assist in finding bugs which break minified code. Defaults to `false`.
|
|
73
|
+
*
|
|
74
|
+
* @returns {any} InjectorService - Returns the newly created injector for this app.
|
|
75
|
+
*/
|
|
76
|
+
bootstrap(element: string | Element | Document, modules?: Array<string | any>, config?: AngularBootstrapConfig): any;
|
|
265
77
|
resumeBootstrap(extraModules: any): any;
|
|
266
78
|
/**
|
|
267
79
|
*
|
|
268
80
|
* @param {any[]} modules
|
|
269
81
|
* @param {boolean?} strictDi
|
|
270
|
-
* @returns {
|
|
82
|
+
* @returns {import("./types").InjectorService}
|
|
83
|
+
*/
|
|
84
|
+
injector(modules: any[], strictDi: boolean | null): import("./types").InjectorService;
|
|
85
|
+
/**
|
|
86
|
+
* @param {Element|Document} element
|
|
271
87
|
*/
|
|
272
|
-
|
|
88
|
+
init(element: Element | Document): void;
|
|
273
89
|
/**
|
|
274
90
|
*
|
|
275
91
|
* The `angular.module` is a global place for creating, registering and retrieving AngularJS
|
|
@@ -315,31 +131,17 @@ export class Angular {
|
|
|
315
131
|
* unspecified then the module is being retrieved for further configuration.
|
|
316
132
|
* @param {Function=} configFn Optional configuration function for the module. Same as
|
|
317
133
|
* {@link import('./types').Module#config Module#config()}.
|
|
318
|
-
* @returns {
|
|
134
|
+
* @returns {NgModule} A newly registered module.
|
|
319
135
|
*/
|
|
320
|
-
module(name: string, requires?: Array<string> | undefined, configFn?: Function | undefined):
|
|
321
|
-
/**
|
|
322
|
-
* @module angular
|
|
323
|
-
* @function reloadWithDebugInfo
|
|
324
|
-
|
|
325
|
-
* @description
|
|
326
|
-
* Use this function to reload the current application with debug information turned on.
|
|
327
|
-
* This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.
|
|
328
|
-
*
|
|
329
|
-
* See {@link ng.$compileProvider#debugInfoEnabled} for more.
|
|
330
|
-
*/
|
|
331
|
-
reloadWithDebugInfo(): void;
|
|
136
|
+
module(name: string, requires?: Array<string> | undefined, configFn?: Function | undefined): NgModule;
|
|
332
137
|
}
|
|
333
138
|
/**
|
|
334
139
|
* Configuration option for AngularTS bootstrap process.
|
|
335
140
|
*/
|
|
336
141
|
export type AngularBootstrapConfig = {
|
|
337
|
-
/**
|
|
338
|
-
* - Indicates whether debug information should be enabled. Setting this to `false` can improve performance but will disable some debugging features.
|
|
339
|
-
*/
|
|
340
|
-
debugInfoEnabled: boolean;
|
|
341
142
|
/**
|
|
342
143
|
* - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
|
|
343
144
|
*/
|
|
344
145
|
strictDi?: boolean;
|
|
345
146
|
};
|
|
147
|
+
import { NgModule } from "./core/ng-module";
|
package/types/public.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Initializes `ng`, `animate`, `message`, `aria` and `router` modules.
|
|
3
|
+
* @param {import('./loader').Angular} angular
|
|
3
4
|
* @returns {import('./types').Module} `ng`module
|
|
4
5
|
*/
|
|
5
|
-
export function publishExternalAPI(): import("./types").Module;
|
|
6
|
+
export function publishExternalAPI(angular: import("./loader").Angular): import("./types").Module;
|
|
7
|
+
/**
|
|
8
|
+
* @type {string} `version` from `package.json`, injected by Rollup plugin
|
|
9
|
+
*/
|
|
10
|
+
export const VERSION: string;
|
package/types/router/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function initRouter(): void;
|
|
1
|
+
export function initRouter(angular: any): void;
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
|
|
3
3
|
* and execution of chain functions.
|
|
4
4
|
*
|
|
5
|
-
* @param {string|
|
|
5
|
+
* @param {string|Node|JQLite|ArrayLike<Element>|(() => void)} element
|
|
6
6
|
* @returns {JQLite}
|
|
7
7
|
*/
|
|
8
|
-
export function JQLite(element: string |
|
|
8
|
+
export function JQLite(element: string | Node | JQLite | ArrayLike<Element> | (() => void)): JQLite;
|
|
9
9
|
export class JQLite {
|
|
10
10
|
/**
|
|
11
11
|
* JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
|
|
12
12
|
* and execution of chain functions.
|
|
13
13
|
*
|
|
14
|
-
* @param {string|
|
|
14
|
+
* @param {string|Node|JQLite|ArrayLike<Element>|(() => void)} element
|
|
15
15
|
* @returns {JQLite}
|
|
16
16
|
*/
|
|
17
|
-
constructor(element: string |
|
|
17
|
+
constructor(element: string | Node | JQLite | ArrayLike<Element> | (() => void));
|
|
18
18
|
/**
|
|
19
19
|
* Remove all child nodes of the set of matched elements from the DOM and clears CACHE data, associated with the node.
|
|
20
20
|
* @returns {JQLite} The current instance of JQLite.
|
|
@@ -101,7 +101,7 @@ export class JQLite {
|
|
|
101
101
|
* @returns {JQLite|any} - The retrieved data if acting as a getter. Otherwise, returns undefined.
|
|
102
102
|
*/
|
|
103
103
|
data(key: string | any, value?: any): JQLite | any;
|
|
104
|
-
replaceWith(arg1: any):
|
|
104
|
+
replaceWith(arg1: any): this;
|
|
105
105
|
children(): JQLite;
|
|
106
106
|
/**
|
|
107
107
|
* @param {string} node
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {HTMLElement} element
|
|
2
|
+
* @param {HTMLElement|JQLite} element
|
|
3
3
|
* @param {string} event
|
|
4
4
|
*/
|
|
5
|
-
export function browserTrigger(element: HTMLElement, event: string): void;
|
|
5
|
+
export function browserTrigger(element: HTMLElement | JQLite, event: string): void;
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
* @param {number} t milliseconds to wait
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
export function wait(t: number): Promise<any>;
|
|
12
|
+
import { JQLite } from "./jqlite/jqlite";
|
package/types/shared/utils.d.ts
CHANGED
|
@@ -490,6 +490,11 @@ export function shallowCopy(src: any, dst: any): any;
|
|
|
490
490
|
*/
|
|
491
491
|
export function assertArg(arg: any, name: any, reason: any): any;
|
|
492
492
|
export function assertArgFn(arg: any, name: any, acceptArrayAnnotation: any): any;
|
|
493
|
+
/**
|
|
494
|
+
* @param {ErrorHandlingConfig} [config]
|
|
495
|
+
* @returns {ErrorHandlingConfig}
|
|
496
|
+
*/
|
|
497
|
+
export function errorHandlingConfig(config?: ErrorHandlingConfig): ErrorHandlingConfig;
|
|
493
498
|
/**
|
|
494
499
|
* This object provides a utility for producing rich Error messages within
|
|
495
500
|
* AngularJS. It can be called as follows:
|
|
@@ -543,4 +548,18 @@ export function directiveNormalize(name: any): any;
|
|
|
543
548
|
*/
|
|
544
549
|
export function hasAnimate(node: Node): boolean;
|
|
545
550
|
export const ngAttrPrefixes: string[];
|
|
546
|
-
|
|
551
|
+
/**
|
|
552
|
+
* Error configuration object. May only contain the options that need to be updated.
|
|
553
|
+
*/
|
|
554
|
+
export type ErrorHandlingConfig = {
|
|
555
|
+
/**
|
|
556
|
+
* - The max depth for stringifying objects. Setting to a
|
|
557
|
+
* non-positive or non-numeric value removes the max depth limit. Default: 5.
|
|
558
|
+
*/
|
|
559
|
+
objectMaxDepth?: number | undefined;
|
|
560
|
+
/**
|
|
561
|
+
* - Specifies whether the generated error URL will
|
|
562
|
+
* contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
|
|
563
|
+
*/
|
|
564
|
+
urlErrorParamsEnabled?: boolean | undefined;
|
|
565
|
+
};
|
package/types/types.d.ts
CHANGED
|
@@ -429,15 +429,15 @@ export type InjectorService = {
|
|
|
429
429
|
/**
|
|
430
430
|
* - Add and load new modules to the injector.
|
|
431
431
|
*/
|
|
432
|
-
loadNewModules
|
|
432
|
+
loadNewModules?: (arg0: Array<Module | string | Injectable<(...args: any[]) => void>>) => void;
|
|
433
433
|
/**
|
|
434
434
|
* - A map of all the modules loaded into the injector.
|
|
435
435
|
*/
|
|
436
|
-
modules
|
|
436
|
+
modules?: {
|
|
437
437
|
[x: string]: Module;
|
|
438
438
|
};
|
|
439
439
|
/**
|
|
440
440
|
* - Indicates if strict dependency injection is enforced.
|
|
441
441
|
*/
|
|
442
|
-
strictDi
|
|
442
|
+
strictDi?: boolean;
|
|
443
443
|
};
|