@angular-wave/angular.ts 0.0.63 → 0.0.65
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/public/jasmine/jasmine-5.1.2/jasmine-html.js +0 -1
- package/src/angular.spec.js +14 -19
- package/src/animations/module.js +2 -2
- package/src/binding.spec.js +7 -4
- package/src/core/animate/animate.spec.js +2 -4
- package/src/core/cache/cache-factory.spec.js +3 -3
- package/src/core/compile/compile.spec.js +66 -60
- package/src/core/controller/controller.spec.js +3 -3
- package/src/core/cookie-reader.spec.js +3 -3
- package/src/core/di/injector.html +18 -0
- package/src/{injector.js → core/di/injector.js} +58 -45
- package/src/{injector.spec.js → core/di/injector.spec.js} +44 -34
- package/src/core/di/injector.test.js +12 -0
- package/src/core/di/ng-module.html +18 -0
- package/src/core/di/ng-module.js +202 -0
- package/src/core/di/ng-module.spec.js +269 -0
- package/src/core/di/ng-module.test.js +12 -0
- package/src/core/filter/filter.spec.js +5 -5
- package/src/core/interpolate/interpolate.spec.js +3 -3
- package/src/core/interval/interval.spec.js +11 -8
- package/src/core/location/location.spec.js +3 -3
- package/src/core/on.spec.js +3 -3
- package/src/core/parser/lexer.spec.js +12 -9
- package/src/core/parser/parse.spec.js +12 -9
- package/src/core/prop.spec.js +48 -36
- package/src/core/q/q.spec.js +7 -10
- package/src/core/q/q.test.js +12 -0
- package/src/core/root-element.spec.js +0 -2
- package/src/core/sce/sce.spec.js +8 -7
- package/src/core/scope/scope.js +0 -1
- package/src/core/scope/scope.spec.js +12 -9
- package/src/core/timeout/timeout.spec.js +11 -8
- package/src/directive/attrs/attrs.spec.js +6 -5
- package/src/directive/attrs/boolean.spec.js +3 -3
- package/src/directive/attrs/element-style.spec.js +5 -4
- package/src/directive/attrs/src.spec.js +9 -7
- package/src/directive/bind/bind.spec.js +12 -9
- package/src/directive/bind/bing-html.spec.js +3 -3
- package/src/directive/change/change.spec.js +3 -3
- package/src/directive/class/class.spec.js +3 -3
- package/src/directive/cloak/cloak.spec.js +3 -3
- package/src/directive/controller/controller.spec.js +3 -4
- package/src/directive/events/click.spec.js +4 -4
- package/src/directive/events/event.spec.js +16 -13
- package/src/directive/form/form.spec.js +12 -10
- package/src/directive/if/if.spec.js +2 -3
- package/src/directive/include/include.spec.js +12 -11
- package/src/directive/init/init.spec.js +3 -4
- package/src/directive/input/input.spec.js +11 -9
- package/src/directive/list/list.spec.js +4 -4
- package/src/directive/model/model.spec.js +12 -12
- package/src/directive/model-options/model-options.spec.js +12 -10
- package/src/directive/non-bindable/non-bindable.spec.js +12 -9
- package/src/directive/options/options.spec.js +11 -8
- package/src/directive/ref/href.spec.js +12 -9
- package/src/directive/ref/ref.spec.js +11 -8
- package/src/directive/repeat/repeat.spec.js +12 -11
- package/src/directive/script/script.spec.js +5 -4
- package/src/directive/select/select.spec.js +11 -8
- package/src/directive/show-hide/show-hide.spec.js +5 -4
- package/src/directive/style/style.spec.js +10 -7
- package/src/directive/switch/switch.spec.js +3 -3
- package/src/directive/validators/validators.spec.js +13 -10
- package/src/exts/aria/aria.js +2 -2
- package/src/exts/aria/aria.spec.js +3 -3
- package/src/exts/messages/messages.js +2 -2
- package/src/exts/messages/messages.spec.js +3 -3
- package/src/filters/filter.spec.js +5 -4
- package/src/filters/filters.spec.js +5 -4
- package/src/filters/limit-to.spec.js +5 -4
- package/src/filters/order-by.spec.js +8 -6
- package/src/index.js +2 -8
- package/src/loader.js +107 -539
- package/src/loader.md +142 -0
- package/src/loader.spec.js +8 -27
- package/src/public.js +113 -107
- package/src/public.spec.js +3 -5
- 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 +3 -3
- package/src/services/http/template-request.spec.js +4 -4
- package/src/services/http-backend/http-backend.spec.js +4 -3
- package/src/shared/jqlite/jqlite.js +0 -2
- package/src/shared/jqlite/jqlite.spec.js +4 -5
- package/src/shared/test-utils.js +1 -1
- package/src/shared/utils.js +10 -1
- package/src/src.html +0 -1
- package/types/animations/module.d.ts +1 -1
- package/types/core/di/injector.d.ts +12 -0
- package/types/core/di/ng-module.d.ts +79 -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/loader.d.ts +53 -179
- package/types/public.d.ts +6 -1
- package/types/router/index.d.ts +1 -1
- package/types/shared/test-utils.d.ts +3 -2
- package/types/shared/utils.d.ts +7 -1
- package/types/injector.d.ts +0 -12
- /package/src/{injector.md → core/di/injector.md} +0 -0
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { JQLite, dealoc } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import {
|
|
3
|
-
import { createInjector } from "../../injector";
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
|
+
import { createInjector } from "../../core/di/injector";
|
|
4
4
|
import { NgModelController } from "./model";
|
|
5
5
|
import { isDefined, valueFn, isObject } from "../../shared/utils";
|
|
6
6
|
import { browserTrigger } from "../../shared/test-utils";
|
|
7
7
|
|
|
8
|
-
import { Angular } from "../../loader";
|
|
9
|
-
|
|
10
8
|
describe("ngModel", () => {
|
|
11
9
|
let ctrl;
|
|
12
10
|
let scope;
|
|
@@ -18,12 +16,15 @@ describe("ngModel", () => {
|
|
|
18
16
|
let $q;
|
|
19
17
|
|
|
20
18
|
beforeEach(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
window.angular = new Angular();
|
|
20
|
+
window.angular
|
|
21
|
+
.module("myModule", ["ng"])
|
|
22
|
+
.decorator("$exceptionHandler", function () {
|
|
23
|
+
return (exception, cause) => {
|
|
24
|
+
throw new Error(exception.message);
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
injector = createInjector(["myModule"]);
|
|
27
28
|
$compile = injector.get("$compile");
|
|
28
29
|
|
|
29
30
|
const attrs = { name: "testAlias", ngModel: "value" };
|
|
@@ -1543,8 +1544,7 @@ describe("ngModel", () => {
|
|
|
1543
1544
|
let module;
|
|
1544
1545
|
|
|
1545
1546
|
beforeEach(() => {
|
|
1546
|
-
angular = new Angular();
|
|
1547
|
-
publishExternalAPI();
|
|
1547
|
+
window.angular = new Angular();
|
|
1548
1548
|
module = window.angular
|
|
1549
1549
|
.module("myModule", [])
|
|
1550
1550
|
.directive("customFormat", () => ({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { defaultModelOptions } from "../../directive/model-options/model-options";
|
|
2
2
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
3
|
-
import { publishExternalAPI } from "../../public";
|
|
4
|
-
import { createInjector } from "../../injector";
|
|
5
|
-
import { valueFn } from "../../shared/utils";
|
|
6
3
|
import { Angular } from "../../loader";
|
|
4
|
+
import { createInjector } from "../../core/di/injector";
|
|
5
|
+
import { valueFn } from "../../shared/utils";
|
|
7
6
|
|
|
8
7
|
function changeGivenInputTo(inputElm, val) {
|
|
9
8
|
inputElm[0].value = val;
|
|
@@ -37,12 +36,15 @@ describe("ngModelOptions", () => {
|
|
|
37
36
|
let injector;
|
|
38
37
|
|
|
39
38
|
beforeEach(() => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
window.angular = new Angular();
|
|
40
|
+
window.angular
|
|
41
|
+
.module("myModule", ["ng"])
|
|
42
|
+
.decorator("$exceptionHandler", function () {
|
|
43
|
+
return (exception, cause) => {
|
|
44
|
+
throw new Error(exception.message);
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
injector = createInjector(["myModule"]);
|
|
46
48
|
$compile = injector.get("$compile");
|
|
47
49
|
$rootScope = injector.get("$rootScope");
|
|
48
50
|
$q = injector.get("$q");
|
|
@@ -984,7 +986,7 @@ describe("ngModelOptions", () => {
|
|
|
984
986
|
|
|
985
987
|
beforeEach(() => {
|
|
986
988
|
angular = new Angular();
|
|
987
|
-
|
|
989
|
+
window.angular = new Angular();
|
|
988
990
|
module = window.angular.module("myModule", []).directive(
|
|
989
991
|
"foo",
|
|
990
992
|
valueFn({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dealoc
|
|
2
|
-
import {
|
|
3
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { dealoc } from "../../shared/jqlite/jqlite";
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
|
+
import { createInjector } from "../../core/di/injector";
|
|
4
4
|
|
|
5
5
|
describe("ngNonBindable", () => {
|
|
6
6
|
let element;
|
|
@@ -9,12 +9,15 @@ describe("ngNonBindable", () => {
|
|
|
9
9
|
let $compile;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
window.angular = new Angular();
|
|
13
|
+
window.angular
|
|
14
|
+
.module("myModule", ["ng"])
|
|
15
|
+
.decorator("$exceptionHandler", function () {
|
|
16
|
+
return (exception, cause) => {
|
|
17
|
+
throw new Error(exception.message);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
injector = createInjector(["myModule"]);
|
|
18
21
|
$compile = injector.get("$compile");
|
|
19
22
|
$rootScope = injector.get("$rootScope");
|
|
20
23
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { createInjector } from "../../core/di/injector";
|
|
2
2
|
import { JQLite, dealoc } from "../../shared/jqlite/jqlite";
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
import {
|
|
5
5
|
forEach,
|
|
6
6
|
isBoolean,
|
|
@@ -158,13 +158,16 @@ describe("ngOptions", () => {
|
|
|
158
158
|
});
|
|
159
159
|
|
|
160
160
|
beforeEach(() => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
window.angular = new Angular();
|
|
162
|
+
window.angular
|
|
163
|
+
.module("myModule", ["ng"])
|
|
164
|
+
.decorator("$exceptionHandler", function () {
|
|
165
|
+
return (exception, cause) => {
|
|
166
|
+
throw new Error(exception.message);
|
|
167
|
+
};
|
|
168
|
+
});
|
|
166
169
|
injector = createInjector([
|
|
167
|
-
"
|
|
170
|
+
"myModule",
|
|
168
171
|
($compileProvider, $provide) => {
|
|
169
172
|
linkLog = [];
|
|
170
173
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
3
|
-
import { dealoc
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
|
+
import { dealoc } from "../../shared/jqlite/jqlite";
|
|
4
4
|
import { isDefined } from "../../shared/utils";
|
|
5
5
|
|
|
6
6
|
describe("ngHref", () => {
|
|
@@ -9,12 +9,15 @@ describe("ngHref", () => {
|
|
|
9
9
|
let element;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
window.angular = new Angular();
|
|
13
|
+
window.angular
|
|
14
|
+
.module("myModule", ["ng"])
|
|
15
|
+
.decorator("$exceptionHandler", function () {
|
|
16
|
+
return (exception, cause) => {
|
|
17
|
+
throw new Error(exception.message);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
createInjector(["myModule"]).invoke((_$rootScope_, _$compile_) => {
|
|
18
21
|
$rootScope = _$rootScope_;
|
|
19
22
|
$compile = _$compile_;
|
|
20
23
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createInjector } from "../../injector";
|
|
2
|
-
import {
|
|
1
|
+
import { createInjector } from "../../core/di/injector";
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
|
|
4
4
|
describe("ngRef", () => {
|
|
5
5
|
beforeEach(() => {
|
|
@@ -33,13 +33,16 @@ describe("ngRef", () => {
|
|
|
33
33
|
let injector;
|
|
34
34
|
|
|
35
35
|
beforeEach(() => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
window.angular = new Angular();
|
|
37
|
+
window.angular
|
|
38
|
+
.module("myModule", ["ng"])
|
|
39
|
+
.decorator("$exceptionHandler", function () {
|
|
40
|
+
return (exception, cause) => {
|
|
41
|
+
throw new Error(exception.message);
|
|
42
|
+
};
|
|
43
|
+
});
|
|
41
44
|
injector = createInjector([
|
|
42
|
-
"
|
|
45
|
+
"myModule",
|
|
43
46
|
($compileProvider) => {
|
|
44
47
|
$compileProvider.component("myComponent", {
|
|
45
48
|
template: "foo",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
import { forEach, valueFn } from "../../shared/utils";
|
|
5
|
-
import { Angular } from "../../loader";
|
|
6
5
|
|
|
7
6
|
describe("ngRepeat", () => {
|
|
8
7
|
let element;
|
|
@@ -17,15 +16,18 @@ describe("ngRepeat", () => {
|
|
|
17
16
|
beforeEach(() => {
|
|
18
17
|
delete window.angular;
|
|
19
18
|
logs = [];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
window.angular = new Angular();
|
|
20
|
+
window.angular
|
|
21
|
+
.module("defaultModule", ["ng"])
|
|
22
|
+
.decorator("$exceptionHandler", function () {
|
|
23
|
+
return (exception, cause) => {
|
|
24
|
+
logs.push(exception);
|
|
25
|
+
console.error(exception, cause);
|
|
26
|
+
};
|
|
27
|
+
});
|
|
26
28
|
|
|
27
29
|
injector = createInjector([
|
|
28
|
-
"
|
|
30
|
+
"defaultModule",
|
|
29
31
|
(_$compileProvider_) => {
|
|
30
32
|
$compileProvider = _$compileProvider_;
|
|
31
33
|
},
|
|
@@ -1285,7 +1287,6 @@ describe("ngRepeat", () => {
|
|
|
1285
1287
|
|
|
1286
1288
|
it("should allow mixing ngRepeat with ngInclude", (done) => {
|
|
1287
1289
|
window.angular = new Angular();
|
|
1288
|
-
publishExternalAPI();
|
|
1289
1290
|
|
|
1290
1291
|
element = JQLite(
|
|
1291
1292
|
'<div><div ng-repeat="i in [1,2]" ng-include="\'/public/test.html\'"></div></div>',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("scriptDirective", () => {
|
|
@@ -9,8 +9,9 @@ describe("scriptDirective", () => {
|
|
|
9
9
|
let $templateCache;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
window.angular = new Angular();
|
|
13
|
+
window.angular.module("myModule", ["ng"]);
|
|
14
|
+
createInjector(["myModule"]).invoke(
|
|
14
15
|
(_$rootScope_, _$compile_, _$templateCache_) => {
|
|
15
16
|
$rootScope = _$rootScope_;
|
|
16
17
|
$compile = _$compile_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
import { forEach, hashKey, equals, isNumberNaN } from "../../shared/utils";
|
|
5
5
|
import { browserTrigger } from "../../shared/test-utils";
|
|
@@ -53,13 +53,16 @@ describe("select", () => {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
beforeEach(() => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
window.angular = new Angular();
|
|
57
|
+
window.angular
|
|
58
|
+
.module("myModule", ["ng"])
|
|
59
|
+
.decorator("$exceptionHandler", function () {
|
|
60
|
+
return (exception, cause) => {
|
|
61
|
+
throw new Error(exception);
|
|
62
|
+
};
|
|
63
|
+
});
|
|
61
64
|
createInjector([
|
|
62
|
-
"
|
|
65
|
+
"myModule",
|
|
63
66
|
($compileProvider) => {
|
|
64
67
|
$compileProvider.directive("spyOnWriteValue", () => ({
|
|
65
68
|
require: "select",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("ngShow / ngHide", () => {
|
|
@@ -8,8 +8,9 @@ describe("ngShow / ngHide", () => {
|
|
|
8
8
|
let element;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
window.angular = new Angular();
|
|
12
|
+
window.angular.module("myModule", ["ng"]);
|
|
13
|
+
createInjector(["myModule"]).invoke(($rootScope, _$compile_) => {
|
|
13
14
|
$scope = $rootScope.$new();
|
|
14
15
|
$compile = _$compile_;
|
|
15
16
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("ng-style", () => {
|
|
@@ -8,11 +8,14 @@ describe("ng-style", () => {
|
|
|
8
8
|
let element;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$
|
|
15
|
-
|
|
11
|
+
window.angular = new Angular();
|
|
12
|
+
window.angular.module("myModule", ["ng"]);
|
|
13
|
+
var injector = createInjector(["myModule"]).invoke(
|
|
14
|
+
($rootScope, _$compile_) => {
|
|
15
|
+
$scope = $rootScope.$new();
|
|
16
|
+
$compile = _$compile_;
|
|
17
|
+
},
|
|
18
|
+
);
|
|
16
19
|
});
|
|
17
20
|
|
|
18
21
|
afterEach(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("ngSwitch", () => {
|
|
@@ -9,7 +9,7 @@ describe("ngSwitch", () => {
|
|
|
9
9
|
let $timeout;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
|
|
12
|
+
window.angular = new Angular();
|
|
13
13
|
createInjector(["ng"]).invoke(($rootScope, _$compile_, _$timeout_) => {
|
|
14
14
|
$scope = $rootScope.$new();
|
|
15
15
|
$compile = _$compile_;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
3
|
-
import { dealoc
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../core/di/injector";
|
|
3
|
+
import { dealoc } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("validators", () => {
|
|
6
6
|
let $rootScope;
|
|
@@ -8,13 +8,16 @@ describe("validators", () => {
|
|
|
8
8
|
let inputElm;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
window.angular = new Angular();
|
|
12
|
+
window.angular
|
|
13
|
+
.module("myModule", ["ng"])
|
|
14
|
+
.decorator("$exceptionHandler", function () {
|
|
15
|
+
return (exception, cause) => {
|
|
16
|
+
console.error(exception);
|
|
17
|
+
throw new Error(exception);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
createInjector(["myModule"]).invoke((_$compile_, _$rootScope_) => {
|
|
18
21
|
$compile = _$compile_;
|
|
19
22
|
$rootScope = _$rootScope_;
|
|
20
23
|
});
|
package/src/exts/aria/aria.js
CHANGED
|
@@ -2,8 +2,8 @@ import { extend } from "../../shared/utils";
|
|
|
2
2
|
|
|
3
3
|
const ARIA_DISABLE_ATTR = "ngAriaDisable";
|
|
4
4
|
|
|
5
|
-
export function initAriaModule() {
|
|
6
|
-
|
|
5
|
+
export function initAriaModule(angular) {
|
|
6
|
+
angular
|
|
7
7
|
.module("ngAria", ["ng"])
|
|
8
8
|
.provider("$aria", $AriaProvider)
|
|
9
9
|
.directive("ngShow", [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createInjector } from "../../injector";
|
|
2
|
-
import {
|
|
1
|
+
import { createInjector } from "../../core/di/injector";
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("$aria", () => {
|
|
@@ -8,7 +8,7 @@ describe("$aria", () => {
|
|
|
8
8
|
let element;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
-
|
|
11
|
+
window.angular = new Angular();
|
|
12
12
|
window.angular.module("test", ["ngAria"]);
|
|
13
13
|
let injector = createInjector(["test"]);
|
|
14
14
|
scope = injector.get("$rootScope");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createInjector } from "../../injector";
|
|
1
|
+
import { createInjector } from "../../core/di/injector";
|
|
2
2
|
import { countWatchers } from "../../core/scope/scope";
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
import { isString } from "../../shared/utils";
|
|
5
5
|
import { JQLite } from "../../shared/jqlite/jqlite";
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ describe("ngMessages", () => {
|
|
|
8
8
|
let $rootScope, $compile, $templateCache;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
-
|
|
11
|
+
window.angular = new Angular();
|
|
12
12
|
window.angular
|
|
13
13
|
.module("app", ["ng", "ngMessages"])
|
|
14
14
|
.directive("messageWrap", () => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../injector";
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
|
+
import { createInjector } from "../core/di/injector";
|
|
3
3
|
import { isString, includes } from "../shared/utils";
|
|
4
4
|
import { JQLite } from "../shared/jqlite/jqlite";
|
|
5
5
|
|
|
@@ -7,8 +7,9 @@ describe("Filter: filter", () => {
|
|
|
7
7
|
let filter;
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
window.angular = new Angular();
|
|
11
|
+
window.angular.module("myModule", ["ng"]);
|
|
12
|
+
var injector = createInjector(["myModule"]);
|
|
12
13
|
filter = injector.get("$filter")("filter");
|
|
13
14
|
});
|
|
14
15
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../injector";
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
|
+
import { createInjector } from "../core/di/injector";
|
|
3
3
|
import { toJson } from "../shared/utils";
|
|
4
4
|
|
|
5
5
|
describe("filters", () => {
|
|
6
6
|
let filter;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
window.angular = new Angular();
|
|
10
|
+
window.angular.module("myModule", ["ng"]);
|
|
11
|
+
var injector = createInjector(["myModule"]);
|
|
11
12
|
filter = injector.get("$filter");
|
|
12
13
|
});
|
|
13
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../injector";
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
|
+
import { createInjector } from "../di/injector";
|
|
3
3
|
import { JQLite } from "../shared/jqlite/jqlite";
|
|
4
4
|
|
|
5
5
|
describe("Filter: limitTo", () => {
|
|
@@ -10,8 +10,9 @@ describe("Filter: limitTo", () => {
|
|
|
10
10
|
let limitTo;
|
|
11
11
|
|
|
12
12
|
beforeEach(() => {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
window.angular = new Angular();
|
|
14
|
+
window.angular.module("myModule", ["ng"]);
|
|
15
|
+
var injector = createInjector(["myModule"]);
|
|
15
16
|
var $filter = injector.get("$filter");
|
|
16
17
|
|
|
17
18
|
items = ["a", "b", "c", "d", "e", "f", "g", "h"];
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createInjector } from "../injector";
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
|
+
import { createInjector } from "../di/injector";
|
|
3
3
|
|
|
4
4
|
describe("Filter: orderBy", () => {
|
|
5
5
|
let orderBy;
|
|
6
6
|
let orderByFilter;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
window.angular = new Angular();
|
|
10
|
+
window.angular.module("myModule", ["ng"]);
|
|
11
|
+
var injector = createInjector(["myModule"]);
|
|
11
12
|
var $filter = injector.get("$filter");
|
|
12
13
|
orderBy = orderByFilter = $filter("orderBy");
|
|
13
14
|
});
|
|
@@ -713,8 +714,9 @@ describe("Filter: orderBy", () => {
|
|
|
713
714
|
}
|
|
714
715
|
|
|
715
716
|
beforeEach(() => {
|
|
716
|
-
|
|
717
|
-
|
|
717
|
+
window.angular = new Angular();
|
|
718
|
+
window.angular.module("myModule", ["ng"]);
|
|
719
|
+
var injector = createInjector(["myModule"]);
|
|
718
720
|
var $filter = injector.get("$filter");
|
|
719
721
|
orderBy = function (collection) {
|
|
720
722
|
const args = Array.prototype.slice.call(arguments, 0);
|
package/src/index.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { Angular
|
|
2
|
-
import { publishExternalAPI } from "./public";
|
|
1
|
+
import { Angular } from "./loader";
|
|
3
2
|
|
|
4
|
-
/**
|
|
5
|
-
* @type {Angular}
|
|
6
|
-
*/
|
|
7
3
|
export const angular = new Angular();
|
|
8
4
|
window["angular"] = angular;
|
|
9
5
|
|
|
10
|
-
publishExternalAPI();
|
|
11
|
-
|
|
12
6
|
document.addEventListener("DOMContentLoaded", () => {
|
|
13
|
-
|
|
7
|
+
angular.init(document);
|
|
14
8
|
});
|