@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,5 +1,5 @@
|
|
|
1
1
|
import { Lexer } from "./lexer";
|
|
2
|
-
import {
|
|
2
|
+
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../injector";
|
|
4
4
|
|
|
5
5
|
describe("lexer", () => {
|
|
@@ -8,13 +8,16 @@ describe("lexer", () => {
|
|
|
8
8
|
let logs = [];
|
|
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
|
+
logs.push(exception);
|
|
17
|
+
console.error(exception, cause);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
let injector = createInjector(["myModule"]);
|
|
18
21
|
$parse = injector.get("$parse");
|
|
19
22
|
$rootScope = injector.get("$rootScope");
|
|
20
23
|
});
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
valueFn,
|
|
9
9
|
extend,
|
|
10
10
|
} from "../../shared/utils";
|
|
11
|
-
import { publishExternalAPI } from "../../public";
|
|
12
11
|
import { createInjector } from "../../injector";
|
|
13
12
|
import { ASTType } from "./ast-type";
|
|
13
|
+
import { Angular } from "../../loader";
|
|
14
14
|
|
|
15
15
|
describe("parser", () => {
|
|
16
16
|
let $rootScope;
|
|
@@ -19,13 +19,16 @@ describe("parser", () => {
|
|
|
19
19
|
let logs = [];
|
|
20
20
|
|
|
21
21
|
beforeEach(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
window.angular = new Angular();
|
|
23
|
+
window.angular
|
|
24
|
+
.module("myModule", ["ng"])
|
|
25
|
+
.decorator("$exceptionHandler", function () {
|
|
26
|
+
return (exception, cause) => {
|
|
27
|
+
logs.push(exception);
|
|
28
|
+
console.error(exception, cause);
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
let injector = createInjector(["myModule"]);
|
|
29
32
|
$parse = injector.get("$parse");
|
|
30
33
|
$rootScope = injector.get("$rootScope");
|
|
31
34
|
});
|
package/src/core/prop.spec.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
2
|
import { createInjector } from "../injector";
|
|
3
3
|
import { valueFn } from "../shared/utils";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
fdescribe("ngProp*", () => {
|
|
6
6
|
let $compile, $rootScope, compileProvider, $sce;
|
|
7
7
|
let logs = [];
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
10
|
logs = [];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
window.angular = new Angular();
|
|
12
|
+
window.angular
|
|
13
|
+
.module("myModule", ["ng"])
|
|
14
|
+
.decorator("$exceptionHandler", function () {
|
|
15
|
+
return (exception) => {
|
|
16
|
+
logs.push(exception);
|
|
17
|
+
throw new Error(exception);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
|
|
17
21
|
let injector = createInjector([
|
|
18
|
-
"
|
|
22
|
+
"myModule",
|
|
19
23
|
function ($compileProvider) {
|
|
20
24
|
compileProvider = $compileProvider;
|
|
21
25
|
},
|
|
@@ -282,7 +286,7 @@ describe("ngProp*", () => {
|
|
|
282
286
|
.createSpy("$$sanitizeUri")
|
|
283
287
|
.and.returnValue("someSanitizedUrl");
|
|
284
288
|
createInjector([
|
|
285
|
-
"
|
|
289
|
+
"myModule",
|
|
286
290
|
($provide) => {
|
|
287
291
|
$provide.value("$$sanitizeUri", $$sanitizeUri);
|
|
288
292
|
},
|
|
@@ -303,7 +307,7 @@ describe("ngProp*", () => {
|
|
|
303
307
|
.createSpy("$$sanitizeUri")
|
|
304
308
|
.and.throwError("Should not have been called");
|
|
305
309
|
createInjector([
|
|
306
|
-
"
|
|
310
|
+
"myModule",
|
|
307
311
|
($provide) => {
|
|
308
312
|
$provide.value("$$sanitizeUri", $$sanitizeUri);
|
|
309
313
|
},
|
|
@@ -378,7 +382,7 @@ describe("ngProp*", () => {
|
|
|
378
382
|
.createSpy("$$sanitizeUri")
|
|
379
383
|
.and.returnValue("someSanitizedUrl");
|
|
380
384
|
createInjector([
|
|
381
|
-
"
|
|
385
|
+
"myModule",
|
|
382
386
|
($provide) => {
|
|
383
387
|
$provide.value("$$sanitizeUri", $$sanitizeUri);
|
|
384
388
|
},
|
|
@@ -421,11 +425,13 @@ describe("ngProp*", () => {
|
|
|
421
425
|
|
|
422
426
|
describe("iframe[src]", () => {
|
|
423
427
|
beforeEach(() => {
|
|
424
|
-
createInjector(["
|
|
425
|
-
$
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
428
|
+
createInjector(["myModule"]).invoke(
|
|
429
|
+
(_$compile_, _$rootScope_, _$sce_) => {
|
|
430
|
+
$compile = _$compile_;
|
|
431
|
+
$rootScope = _$rootScope_;
|
|
432
|
+
$sce = _$sce_;
|
|
433
|
+
},
|
|
434
|
+
);
|
|
429
435
|
});
|
|
430
436
|
|
|
431
437
|
it("should pass through src properties for the same domain", () => {
|
|
@@ -482,11 +488,13 @@ describe("ngProp*", () => {
|
|
|
482
488
|
|
|
483
489
|
describe("base[href]", () => {
|
|
484
490
|
beforeEach(() => {
|
|
485
|
-
createInjector(["
|
|
486
|
-
$
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
491
|
+
createInjector(["myModule"]).invoke(
|
|
492
|
+
(_$compile_, _$rootScope_, _$sce_) => {
|
|
493
|
+
$compile = _$compile_;
|
|
494
|
+
$rootScope = _$rootScope_;
|
|
495
|
+
$sce = _$sce_;
|
|
496
|
+
},
|
|
497
|
+
);
|
|
490
498
|
});
|
|
491
499
|
|
|
492
500
|
it("should be a RESOURCE_URL context", () => {
|
|
@@ -505,11 +513,13 @@ describe("ngProp*", () => {
|
|
|
505
513
|
|
|
506
514
|
describe("form[action]", () => {
|
|
507
515
|
beforeEach(() => {
|
|
508
|
-
createInjector(["
|
|
509
|
-
$
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
516
|
+
createInjector(["myModule"]).invoke(
|
|
517
|
+
(_$compile_, _$rootScope_, _$sce_) => {
|
|
518
|
+
$compile = _$compile_;
|
|
519
|
+
$rootScope = _$rootScope_;
|
|
520
|
+
$sce = _$sce_;
|
|
521
|
+
},
|
|
522
|
+
);
|
|
513
523
|
});
|
|
514
524
|
|
|
515
525
|
it("should pass through action property for the same domain", () => {
|
|
@@ -566,11 +576,13 @@ describe("ngProp*", () => {
|
|
|
566
576
|
|
|
567
577
|
describe("link[href]", () => {
|
|
568
578
|
beforeEach(() => {
|
|
569
|
-
createInjector(["
|
|
570
|
-
$
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
579
|
+
createInjector(["myModule"]).invoke(
|
|
580
|
+
(_$compile_, _$rootScope_, _$sce_) => {
|
|
581
|
+
$compile = _$compile_;
|
|
582
|
+
$rootScope = _$rootScope_;
|
|
583
|
+
$sce = _$sce_;
|
|
584
|
+
},
|
|
585
|
+
);
|
|
574
586
|
});
|
|
575
587
|
|
|
576
588
|
it("should reject invalid RESOURCE_URLs", () => {
|
|
@@ -606,7 +618,7 @@ describe("ngProp*", () => {
|
|
|
606
618
|
describe("SCE disabled", () => {
|
|
607
619
|
beforeEach(() => {
|
|
608
620
|
createInjector([
|
|
609
|
-
"
|
|
621
|
+
"myModule",
|
|
610
622
|
($sceProvider) => {
|
|
611
623
|
$sceProvider.enabled(false);
|
|
612
624
|
},
|
|
@@ -656,7 +668,7 @@ describe("ngProp*", () => {
|
|
|
656
668
|
describe("SCE enabled", () => {
|
|
657
669
|
beforeEach(() => {
|
|
658
670
|
createInjector([
|
|
659
|
-
"
|
|
671
|
+
"myModule",
|
|
660
672
|
($sceProvider) => {
|
|
661
673
|
$sceProvider.enabled(true);
|
|
662
674
|
},
|
|
@@ -728,7 +740,7 @@ describe("ngProp*", () => {
|
|
|
728
740
|
}
|
|
729
741
|
|
|
730
742
|
createInjector([
|
|
731
|
-
"
|
|
743
|
+
"myModule",
|
|
732
744
|
($provide) => {
|
|
733
745
|
$provide.decorator("$sce", ($delegate) => {
|
|
734
746
|
$delegate.trustAsHtml = function (html) {
|
package/src/core/q/q.spec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createInjector } from "../../injector";
|
|
2
2
|
import { setupModuleLoader } from "../../loader";
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
http://wiki.commonjs.org/wiki/Promises
|
|
@@ -36,14 +36,14 @@ describe("q", () => {
|
|
|
36
36
|
let $q, $rootScope, $injector;
|
|
37
37
|
|
|
38
38
|
beforeEach(() => {
|
|
39
|
-
|
|
39
|
+
window.angular = new Angular();
|
|
40
40
|
$injector = createInjector(["ng"]);
|
|
41
41
|
$q = $injector.get("$q");
|
|
42
42
|
$rootScope = $injector.get("$rootScope");
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
it("sets up $q", function () {
|
|
46
|
-
|
|
46
|
+
window.angular = new Angular();
|
|
47
47
|
var injector = createInjector(["ng"]);
|
|
48
48
|
expect(injector.has("$q")).toBe(true);
|
|
49
49
|
});
|
|
@@ -645,7 +645,7 @@ describe("all", function () {
|
|
|
645
645
|
let $q, $rootScope, $injector;
|
|
646
646
|
|
|
647
647
|
beforeEach(() => {
|
|
648
|
-
|
|
648
|
+
window.angular = new Angular();
|
|
649
649
|
$injector = createInjector(["ng"]);
|
|
650
650
|
$q = $injector.get("$q");
|
|
651
651
|
$rootScope = $injector.get("$rootScope");
|
|
@@ -706,7 +706,7 @@ describe("all", function () {
|
|
|
706
706
|
|
|
707
707
|
beforeEach(() => {
|
|
708
708
|
setupModuleLoader(window);
|
|
709
|
-
|
|
709
|
+
window.angular = new Angular();
|
|
710
710
|
$injector = createInjector(["ng"]);
|
|
711
711
|
$q = $injector.get("$q");
|
|
712
712
|
$rootScope = $injector.get("$rootScope");
|
|
@@ -741,7 +741,7 @@ describe("all", function () {
|
|
|
741
741
|
|
|
742
742
|
beforeEach(() => {
|
|
743
743
|
setupModuleLoader(window);
|
|
744
|
-
|
|
744
|
+
window.angular = new Angular();
|
|
745
745
|
$injector = createInjector(["ng"]);
|
|
746
746
|
$q = $injector.get("$q");
|
|
747
747
|
$$q = $injector.get("$$q");
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { JQLite, dealoc } from "../shared/jqlite/jqlite";
|
|
2
2
|
import { Angular } from "../loader";
|
|
3
|
-
import { publishExternalAPI } from "../public";
|
|
4
3
|
|
|
5
4
|
describe("$rootElement", () => {
|
|
6
5
|
let angular = new Angular();
|
|
7
|
-
publishExternalAPI();
|
|
8
6
|
|
|
9
7
|
it("should publish the bootstrap element into $rootElement", () => {
|
|
10
8
|
const element = JQLite("<div></div>");
|
package/src/core/sce/sce.spec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createInjector } from "../../injector";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
import { adjustMatcher } from "./sce";
|
|
5
5
|
|
|
6
6
|
describe("SCE", () => {
|
|
@@ -10,9 +10,10 @@ describe("SCE", () => {
|
|
|
10
10
|
|
|
11
11
|
describe("when disabled", () => {
|
|
12
12
|
beforeEach(function () {
|
|
13
|
-
|
|
13
|
+
window.angular = new Angular();
|
|
14
|
+
window.angular.module("myModule", ["ng"]);
|
|
14
15
|
createInjector([
|
|
15
|
-
"
|
|
16
|
+
"myModule",
|
|
16
17
|
function ($sceProvider) {
|
|
17
18
|
$sceProvider.enabled(false);
|
|
18
19
|
},
|
|
@@ -34,7 +35,7 @@ describe("SCE", () => {
|
|
|
34
35
|
|
|
35
36
|
describe("when enabled", () => {
|
|
36
37
|
beforeEach(function () {
|
|
37
|
-
|
|
38
|
+
window.angular = new Angular();
|
|
38
39
|
createInjector([
|
|
39
40
|
"ng",
|
|
40
41
|
function ($sceProvider) {
|
|
@@ -145,7 +146,7 @@ describe("SCE", () => {
|
|
|
145
146
|
|
|
146
147
|
describe("replace $sceDelegate", () => {
|
|
147
148
|
it("should override the default $sce.trustAs/valueOf/etc.", () => {
|
|
148
|
-
|
|
149
|
+
window.angular = new Angular();
|
|
149
150
|
createInjector([
|
|
150
151
|
"ng",
|
|
151
152
|
function ($provide) {
|
|
@@ -175,7 +176,7 @@ describe("SCE", () => {
|
|
|
175
176
|
});
|
|
176
177
|
|
|
177
178
|
describe("$sce.parseAs", () => {
|
|
178
|
-
|
|
179
|
+
window.angular = new Angular();
|
|
179
180
|
beforeEach(function () {
|
|
180
181
|
createInjector(["ng"]).invoke((_$sce_, _$rootScope_) => {
|
|
181
182
|
$sce = _$sce_;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $$asyncQueue } from "./scope";
|
|
2
2
|
import { extend, sliceArgs } from "../../shared/utils";
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
import { createInjector } from "../../injector";
|
|
5
5
|
|
|
6
6
|
describe("Scope", function () {
|
|
@@ -12,14 +12,17 @@ describe("Scope", function () {
|
|
|
12
12
|
beforeEach(() => {
|
|
13
13
|
logs = [];
|
|
14
14
|
delete window.angular;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
window.angular = new Angular();
|
|
16
|
+
window.angular
|
|
17
|
+
.module("myModule", ["ng"])
|
|
18
|
+
.decorator("$exceptionHandler", function () {
|
|
19
|
+
return (exception, cause) => {
|
|
20
|
+
logs.push(exception);
|
|
21
|
+
console.error(exception, cause);
|
|
22
|
+
};
|
|
23
|
+
});
|
|
21
24
|
|
|
22
|
-
let injector = createInjector(["
|
|
25
|
+
let injector = createInjector(["myModule"]);
|
|
23
26
|
$parse = injector.get("$parse");
|
|
24
27
|
$browser = injector.get("$browser");
|
|
25
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../injector";
|
|
3
3
|
import { wait } from "../../shared/test-utils";
|
|
4
4
|
|
|
@@ -14,12 +14,15 @@ describe("$timeout", () => {
|
|
|
14
14
|
beforeEach(() => {
|
|
15
15
|
errors = [];
|
|
16
16
|
log = [];
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
window.angular = new Angular();
|
|
18
|
+
window.angular
|
|
19
|
+
.module("myModule", ["ng"])
|
|
20
|
+
.decorator("$exceptionHandler", function () {
|
|
21
|
+
return (exception) => {
|
|
22
|
+
errors.push(exception);
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
injector = createInjector(["myModule"]);
|
|
23
26
|
|
|
24
27
|
$interval = injector.get("$interval");
|
|
25
28
|
$rootScope = injector.get("$rootScope");
|
|
@@ -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("ngSrcset", () => {
|
|
|
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
|
|
|
@@ -6,7 +6,7 @@ describe("boolean attr directives", () => {
|
|
|
6
6
|
let element, $rootScope, $compile, $rootElement;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
|
-
|
|
9
|
+
window.angular = new Angular();
|
|
10
10
|
createInjector([
|
|
11
11
|
"ng",
|
|
12
12
|
($provide) => {
|
|
@@ -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("style", () => {
|
|
|
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
|
$rootScope = _$rootScope_;
|
|
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,8 +8,9 @@ describe("ngSrc", () => {
|
|
|
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
|
});
|
|
@@ -84,8 +85,9 @@ describe("ngSrc", () => {
|
|
|
84
85
|
let $sce;
|
|
85
86
|
|
|
86
87
|
beforeEach(() => {
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
window.angular = new Angular();
|
|
89
|
+
window.angular.module("myModule", ["ng"]);
|
|
90
|
+
createInjector(["myModule"]).invoke(($rootScope, _$compile_, _$sce_) => {
|
|
89
91
|
$scope = $rootScope.$new();
|
|
90
92
|
$compile = _$compile_;
|
|
91
93
|
$sce = _$sce_;
|
|
@@ -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
|
|
|
@@ -10,12 +10,15 @@ describe("ng-bind", () => {
|
|
|
10
10
|
let $sce;
|
|
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, cause) => {
|
|
18
|
+
throw new Error(exception.message);
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
createInjector(["myModule"]).invoke((_$rootScope_, _$compile_, _$sce_) => {
|
|
19
22
|
$rootScope = _$rootScope_;
|
|
20
23
|
$compile = _$compile_;
|
|
21
24
|
$sce = _$sce_;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createInjector } from "../../injector";
|
|
2
2
|
import { forEach } from "../../shared/utils";
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
|
|
5
5
|
describe("ngBindHtml", () => {
|
|
6
6
|
let $rootScope, $compile;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
|
-
|
|
9
|
+
window.angular = new Angular();
|
|
10
10
|
createInjector(["ng"]).invoke((_$rootScope_, _$compile_) => {
|
|
11
11
|
$rootScope = _$rootScope_;
|
|
12
12
|
$compile = _$compile_;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createInjector } from "../../injector";
|
|
2
2
|
import { dealoc } from "../../shared/jqlite/jqlite";
|
|
3
|
-
import {
|
|
3
|
+
import { Angular } from "../../loader";
|
|
4
4
|
|
|
5
5
|
describe("ngChange", () => {
|
|
6
6
|
let injector;
|
|
7
7
|
let el;
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
|
-
|
|
10
|
+
window.angular = new Angular();
|
|
11
11
|
injector = createInjector(["ng"]);
|
|
12
12
|
});
|
|
13
13
|
|
|
@@ -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
|
import { valueFn } from "../../shared/utils";
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ describe("ngClass", () => {
|
|
|
10
10
|
let injector;
|
|
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,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("ngCloak", () => {
|
|
@@ -9,7 +9,7 @@ describe("ngCloak", () => {
|
|
|
9
9
|
let injector;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
|
|
12
|
+
window.angular = new Angular();
|
|
13
13
|
injector = createInjector(["ng"]);
|
|
14
14
|
$compile = injector.get("$compile");
|
|
15
15
|
$rootScope = injector.get("$rootScope");
|
|
@@ -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 { bind } from "../../shared/utils";
|
|
5
|
-
import { Angular } from "../../loader";
|
|
6
5
|
|
|
7
6
|
describe("ngController", () => {
|
|
8
7
|
let angular;
|
|
@@ -34,7 +33,7 @@ describe("ngController", () => {
|
|
|
34
33
|
|
|
35
34
|
beforeEach(() => {
|
|
36
35
|
angular = new Angular();
|
|
37
|
-
|
|
36
|
+
window.angular = new Angular();
|
|
38
37
|
injector = createInjector([
|
|
39
38
|
"ng",
|
|
40
39
|
($controllerProvider) => {
|
|
@@ -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("ngClick", () => {
|
|
@@ -9,7 +9,7 @@ describe("ngClick", () => {
|
|
|
9
9
|
let injector;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
|
|
12
|
+
window.angular = new Angular();
|
|
13
13
|
injector = createInjector(["ng"]);
|
|
14
14
|
$compile = injector.get("$compile");
|
|
15
15
|
$rootScope = injector.get("$rootScope");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../public";
|
|
2
|
-
import { createInjector } from "../../injector";
|
|
3
|
-
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
1
|
import { Angular } from "../../loader";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
|
+
import { dealoc } from "../../shared/jqlite/jqlite";
|
|
5
4
|
|
|
6
5
|
describe("event directives", () => {
|
|
7
6
|
let angular;
|
|
@@ -12,16 +11,20 @@ describe("event directives", () => {
|
|
|
12
11
|
let logs = [];
|
|
13
12
|
|
|
14
13
|
beforeEach(() => {
|
|
15
|
-
angular = new Angular();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
angular = window.angular = new Angular();
|
|
15
|
+
window.angular
|
|
16
|
+
.module("myModule", ["ng"])
|
|
17
|
+
.decorator("$exceptionHandler", function () {
|
|
18
|
+
return (exception, cause) => {
|
|
19
|
+
logs.push(exception.message);
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
injector = createInjector(["myModule"]).invoke(
|
|
23
|
+
(_$rootScope_, _$compile_) => {
|
|
24
|
+
$rootScope = _$rootScope_;
|
|
25
|
+
$compile = _$compile_;
|
|
26
|
+
},
|
|
27
|
+
);
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
afterEach(() => {
|