@angular-wave/angular.ts 0.0.63 → 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 -18
- 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.spec.js +64 -57
- 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.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 +2 -3
- 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.spec.js +26 -29
- package/src/loader.js +106 -538
- 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.spec.js +3 -4
- package/src/shared/test-utils.js +1 -1
- package/types/animations/module.d.ts +1 -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/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
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
import { FormController } from "../../directive/form/form";
|
|
5
|
-
import { Angular } from "../../loader";
|
|
6
5
|
|
|
7
6
|
describe("form", () => {
|
|
8
7
|
let doc;
|
|
@@ -12,13 +11,16 @@ describe("form", () => {
|
|
|
12
11
|
let injector;
|
|
13
12
|
|
|
14
13
|
beforeEach(() => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
window.angular = new Angular();
|
|
15
|
+
window.angular
|
|
16
|
+
.module("myModule", ["ng"])
|
|
17
|
+
.decorator("$exceptionHandler", function () {
|
|
18
|
+
return (exception, cause) => {
|
|
19
|
+
throw new Error(exception);
|
|
20
|
+
};
|
|
21
|
+
});
|
|
20
22
|
injector = createInjector([
|
|
21
|
-
"
|
|
23
|
+
"myModule",
|
|
22
24
|
($compileProvider) => {
|
|
23
25
|
$compileProvider.directive("storeModelCtrl", () => ({
|
|
24
26
|
require: "ngModel",
|
|
@@ -1407,7 +1409,7 @@ describe("form", () => {
|
|
|
1407
1409
|
doc = JQLite('<form name="myForm"></form>');
|
|
1408
1410
|
JQLite(dummy).append(doc);
|
|
1409
1411
|
let angular = new Angular();
|
|
1410
|
-
|
|
1412
|
+
window.angular = new Angular();
|
|
1411
1413
|
myModule = window.angular.module("myModule", ["ngAnimate"]);
|
|
1412
1414
|
|
|
1413
1415
|
injector = angular.bootstrap(dummy, ["myModule"]);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
2
2
|
import { forEach, valueFn } from "../../shared/utils";
|
|
3
|
-
import { publishExternalAPI } from "../../public";
|
|
4
|
-
import { createInjector } from "../../injector";
|
|
5
3
|
import { Angular } from "../../loader";
|
|
4
|
+
import { createInjector } from "../../injector";
|
|
6
5
|
import { wait } from "../../shared/test-utils";
|
|
7
6
|
|
|
8
7
|
describe("ngIf", () => {
|
|
@@ -17,7 +16,7 @@ describe("ngIf", () => {
|
|
|
17
16
|
|
|
18
17
|
beforeEach(function () {
|
|
19
18
|
angular = new Angular();
|
|
20
|
-
|
|
19
|
+
window.angular = new Angular();
|
|
21
20
|
injector = createInjector([
|
|
22
21
|
"ng",
|
|
23
22
|
function (_$compileProvider_) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
2
2
|
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../injector";
|
|
4
|
-
import { publishExternalAPI } from "../../public";
|
|
5
4
|
import { valueFn } from "../../shared/utils";
|
|
6
5
|
import { wait } from "../../shared/test-utils";
|
|
7
6
|
|
|
@@ -17,14 +16,16 @@ describe("ngInclude", () => {
|
|
|
17
16
|
|
|
18
17
|
beforeEach(() => {
|
|
19
18
|
delete window.angular;
|
|
20
|
-
angular = new Angular();
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
angular = window.angular = new Angular();
|
|
20
|
+
module = angular
|
|
21
|
+
.module("myModule", ["ng"])
|
|
22
|
+
.decorator("$exceptionHandler", function () {
|
|
23
|
+
return (exception, cause) => {
|
|
24
|
+
throw new Error(exception.message);
|
|
25
|
+
};
|
|
26
|
+
});
|
|
26
27
|
// module = window.angular.module("myModule", []);
|
|
27
|
-
injector = createInjector(["
|
|
28
|
+
injector = createInjector(["myModule"]);
|
|
28
29
|
$rootScope = injector.get("$rootScope");
|
|
29
30
|
$templateCache = injector.get("$templateCache");
|
|
30
31
|
$compile = injector.get("$compile");
|
|
@@ -94,7 +95,7 @@ describe("ngInclude", () => {
|
|
|
94
95
|
|
|
95
96
|
it("should NOT use untrusted URL expressions ", () => {
|
|
96
97
|
element = JQLite('<ng-include src="url"></ng-include>');
|
|
97
|
-
const injector = angular.bootstrap(element);
|
|
98
|
+
const injector = angular.bootstrap(element, ["myModule"]);
|
|
98
99
|
$rootScope = injector.get("$rootScope");
|
|
99
100
|
$rootScope.url = "http://example.com/myUrl";
|
|
100
101
|
expect(() => {
|
|
@@ -104,7 +105,7 @@ describe("ngInclude", () => {
|
|
|
104
105
|
|
|
105
106
|
it("should NOT use mistyped expressions ", () => {
|
|
106
107
|
element = JQLite('<ng-include src="url"></ng-include>');
|
|
107
|
-
const injector = angular.bootstrap(element);
|
|
108
|
+
const injector = angular.bootstrap(element, ["myModule"]);
|
|
108
109
|
$rootScope = injector.get("$rootScope");
|
|
109
110
|
$rootScope.name = "chirayu";
|
|
110
111
|
let $sce = injector.get("$sce");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import {
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../injector";
|
|
4
|
-
import { Angular, setupModuleLoader } from "../../loader";
|
|
5
4
|
|
|
6
5
|
describe("ngInit", () => {
|
|
7
6
|
let element;
|
|
@@ -13,7 +12,7 @@ describe("ngInit", () => {
|
|
|
13
12
|
|
|
14
13
|
beforeEach(() => {
|
|
15
14
|
angular = new Angular();
|
|
16
|
-
|
|
15
|
+
window.angular = new Angular();
|
|
17
16
|
injector = createInjector(["ng"]);
|
|
18
17
|
$rootScope = injector.get("$rootScope");
|
|
19
18
|
$compile = injector.get("$compile");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
import { EMAIL_REGEXP, ISO_DATE_REGEXP, URL_REGEXP } from "./input";
|
|
@@ -10,12 +10,15 @@ describe("input", () => {
|
|
|
10
10
|
let inputElm;
|
|
11
11
|
|
|
12
12
|
beforeEach(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
window.angular = new Angular();
|
|
14
|
+
window.angular
|
|
15
|
+
.module("myModule", ["ng"])
|
|
16
|
+
.decorator("$exceptionHandler", function () {
|
|
17
|
+
return (exception) => {
|
|
18
|
+
throw new Error(exception.message);
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
createInjector(["myModule"]).invoke((_$compile_, $rootScope) => {
|
|
19
22
|
$compile = _$compile_;
|
|
20
23
|
scope = $rootScope.$new();
|
|
21
24
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import {
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../injector";
|
|
4
4
|
|
|
5
5
|
describe("ngList", () => {
|
|
@@ -10,7 +10,7 @@ describe("ngList", () => {
|
|
|
10
10
|
let inputElm;
|
|
11
11
|
|
|
12
12
|
beforeEach(() => {
|
|
13
|
-
|
|
13
|
+
window.angular = new Angular();
|
|
14
14
|
injector = createInjector(["ng"]);
|
|
15
15
|
$compile = injector.get("$compile");
|
|
16
16
|
$rootScope = injector.get("$rootScope");
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { JQLite, dealoc } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import {
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../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 {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
import { createInjector } from "../../injector";
|
|
5
5
|
import { valueFn } from "../../shared/utils";
|
|
6
|
-
import { Angular } from "../../loader";
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import {
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../injector";
|
|
4
4
|
|
|
5
5
|
describe("ngNonBindable", () => {
|
|
@@ -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
1
|
import { createInjector } from "../../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 {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
|
-
import { dealoc
|
|
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
1
|
import { createInjector } from "../../injector";
|
|
2
|
-
import {
|
|
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 {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
import { forEach, hashKey, equals, isNumberNaN } from "../../shared/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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
4
|
|
|
@@ -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 {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
|
-
import { dealoc
|
|
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
1
|
import { createInjector } from "../../injector";
|
|
2
|
-
import {
|
|
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
1
|
import { createInjector } from "../../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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
2
|
import { createInjector } from "../injector";
|
|
3
3
|
import { isString, includes } from "../shared/utils";
|
|
4
4
|
import { JQLite } from "../shared/jqlite/jqlite";
|
|
@@ -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
|
|