@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.
Files changed (113) hide show
  1. package/Makefile +6 -2
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +1 -1
  5. package/public/jasmine/jasmine-5.1.2/jasmine-html.js +0 -1
  6. package/src/angular.spec.js +14 -19
  7. package/src/animations/module.js +2 -2
  8. package/src/binding.spec.js +7 -4
  9. package/src/core/animate/animate.spec.js +2 -4
  10. package/src/core/cache/cache-factory.spec.js +3 -3
  11. package/src/core/compile/compile.spec.js +66 -60
  12. package/src/core/controller/controller.spec.js +3 -3
  13. package/src/core/cookie-reader.spec.js +3 -3
  14. package/src/core/di/injector.html +18 -0
  15. package/src/{injector.js → core/di/injector.js} +58 -45
  16. package/src/{injector.spec.js → core/di/injector.spec.js} +44 -34
  17. package/src/core/di/injector.test.js +12 -0
  18. package/src/core/di/ng-module.html +18 -0
  19. package/src/core/di/ng-module.js +202 -0
  20. package/src/core/di/ng-module.spec.js +269 -0
  21. package/src/core/di/ng-module.test.js +12 -0
  22. package/src/core/filter/filter.spec.js +5 -5
  23. package/src/core/interpolate/interpolate.spec.js +3 -3
  24. package/src/core/interval/interval.spec.js +11 -8
  25. package/src/core/location/location.spec.js +3 -3
  26. package/src/core/on.spec.js +3 -3
  27. package/src/core/parser/lexer.spec.js +12 -9
  28. package/src/core/parser/parse.spec.js +12 -9
  29. package/src/core/prop.spec.js +48 -36
  30. package/src/core/q/q.spec.js +7 -10
  31. package/src/core/q/q.test.js +12 -0
  32. package/src/core/root-element.spec.js +0 -2
  33. package/src/core/sce/sce.spec.js +8 -7
  34. package/src/core/scope/scope.js +0 -1
  35. package/src/core/scope/scope.spec.js +12 -9
  36. package/src/core/timeout/timeout.spec.js +11 -8
  37. package/src/directive/attrs/attrs.spec.js +6 -5
  38. package/src/directive/attrs/boolean.spec.js +3 -3
  39. package/src/directive/attrs/element-style.spec.js +5 -4
  40. package/src/directive/attrs/src.spec.js +9 -7
  41. package/src/directive/bind/bind.spec.js +12 -9
  42. package/src/directive/bind/bing-html.spec.js +3 -3
  43. package/src/directive/change/change.spec.js +3 -3
  44. package/src/directive/class/class.spec.js +3 -3
  45. package/src/directive/cloak/cloak.spec.js +3 -3
  46. package/src/directive/controller/controller.spec.js +3 -4
  47. package/src/directive/events/click.spec.js +4 -4
  48. package/src/directive/events/event.spec.js +16 -13
  49. package/src/directive/form/form.spec.js +12 -10
  50. package/src/directive/if/if.spec.js +2 -3
  51. package/src/directive/include/include.spec.js +12 -11
  52. package/src/directive/init/init.spec.js +3 -4
  53. package/src/directive/input/input.spec.js +11 -9
  54. package/src/directive/list/list.spec.js +4 -4
  55. package/src/directive/model/model.spec.js +12 -12
  56. package/src/directive/model-options/model-options.spec.js +12 -10
  57. package/src/directive/non-bindable/non-bindable.spec.js +12 -9
  58. package/src/directive/options/options.spec.js +11 -8
  59. package/src/directive/ref/href.spec.js +12 -9
  60. package/src/directive/ref/ref.spec.js +11 -8
  61. package/src/directive/repeat/repeat.spec.js +12 -11
  62. package/src/directive/script/script.spec.js +5 -4
  63. package/src/directive/select/select.spec.js +11 -8
  64. package/src/directive/show-hide/show-hide.spec.js +5 -4
  65. package/src/directive/style/style.spec.js +10 -7
  66. package/src/directive/switch/switch.spec.js +3 -3
  67. package/src/directive/validators/validators.spec.js +13 -10
  68. package/src/exts/aria/aria.js +2 -2
  69. package/src/exts/aria/aria.spec.js +3 -3
  70. package/src/exts/messages/messages.js +2 -2
  71. package/src/exts/messages/messages.spec.js +3 -3
  72. package/src/filters/filter.spec.js +5 -4
  73. package/src/filters/filters.spec.js +5 -4
  74. package/src/filters/limit-to.spec.js +5 -4
  75. package/src/filters/order-by.spec.js +8 -6
  76. package/src/index.js +2 -8
  77. package/src/loader.js +107 -539
  78. package/src/loader.md +142 -0
  79. package/src/loader.spec.js +8 -27
  80. package/src/public.js +113 -107
  81. package/src/public.spec.js +3 -5
  82. package/src/router/directives/state-directives.spec.js +0 -3
  83. package/src/router/directives/view-directive.spec.js +0 -6
  84. package/src/router/index.js +2 -2
  85. package/src/router/services.spec.js +0 -2
  86. package/src/router/state/state.spec.js +2 -4
  87. package/src/router/state-filter.spec.js +0 -2
  88. package/src/router/template-factory.spec.js +0 -2
  89. package/src/router/url/url-service.spec.js +0 -2
  90. package/src/router/view/view.spec.js +1 -2
  91. package/src/router/view-hook.spec.js +0 -2
  92. package/src/router/view-scroll.spec.js +0 -3
  93. package/src/services/http/http.spec.js +3 -3
  94. package/src/services/http/template-request.spec.js +4 -4
  95. package/src/services/http-backend/http-backend.spec.js +4 -3
  96. package/src/shared/jqlite/jqlite.js +0 -2
  97. package/src/shared/jqlite/jqlite.spec.js +4 -5
  98. package/src/shared/test-utils.js +1 -1
  99. package/src/shared/utils.js +10 -1
  100. package/src/src.html +0 -1
  101. package/types/animations/module.d.ts +1 -1
  102. package/types/core/di/injector.d.ts +12 -0
  103. package/types/core/di/ng-module.d.ts +79 -0
  104. package/types/exts/aria/aria.d.ts +1 -1
  105. package/types/exts/messages/messages.d.ts +1 -1
  106. package/types/index.d.ts +0 -3
  107. package/types/loader.d.ts +53 -179
  108. package/types/public.d.ts +6 -1
  109. package/types/router/index.d.ts +1 -1
  110. package/types/shared/test-utils.d.ts +3 -2
  111. package/types/shared/utils.d.ts +7 -1
  112. package/types/injector.d.ts +0 -12
  113. /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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
22
- return (exception, cause) => {
23
- throw new Error(exception.message);
24
- };
25
- });
26
- injector = createInjector(["ng"]);
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
41
- return (exception, cause) => {
42
- throw new Error(exception.message);
43
- };
44
- });
45
- injector = createInjector(["ng"]);
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
- publishExternalAPI();
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, JQLite } from "../../shared/jqlite/jqlite";
2
- import { publishExternalAPI } from "../../public";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
13
- return (exception, cause) => {
14
- throw new Error(exception.message);
15
- };
16
- });
17
- injector = createInjector(["ng"]);
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
162
- return (exception, cause) => {
163
- throw new Error(exception.message);
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
- "ng",
170
+ "myModule",
168
171
  ($compileProvider, $provide) => {
169
172
  linkLog = [];
170
173
 
@@ -1,6 +1,6 @@
1
- import { publishExternalAPI } from "../../public";
2
- import { createInjector } from "../../injector";
3
- import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
13
- return (exception, cause) => {
14
- throw new Error(exception.message);
15
- };
16
- });
17
- createInjector(["ng"]).invoke((_$rootScope_, _$compile_) => {
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
37
- return (exception, cause) => {
38
- throw new Error(exception.message);
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
- "ng",
45
+ "myModule",
43
46
  ($compileProvider) => {
44
47
  $compileProvider.component("myComponent", {
45
48
  template: "foo",
@@ -1,8 +1,7 @@
1
- import { publishExternalAPI } from "../../public";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
21
- return (exception, cause) => {
22
- logs.push(exception);
23
- console.error(exception, cause);
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
- "ng",
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI();
13
- createInjector(["ng"]).invoke(
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
57
- return (exception, cause) => {
58
- throw new Error(exception);
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
- "ng",
65
+ "myModule",
63
66
  ($compileProvider) => {
64
67
  $compileProvider.directive("spyOnWriteValue", () => ({
65
68
  require: "select",
@@ -1,5 +1,5 @@
1
- import { publishExternalAPI } from "../../public";
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
- publishExternalAPI();
12
- createInjector(["ng"]).invoke(($rootScope, _$compile_) => {
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI();
12
- createInjector(["ng"]).invoke(($rootScope, _$compile_) => {
13
- $scope = $rootScope.$new();
14
- $compile = _$compile_;
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI();
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 { publishExternalAPI } from "../../public";
2
- import { createInjector } from "../../injector";
3
- import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
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
- publishExternalAPI().decorator("$exceptionHandler", function () {
12
- return (exception, cause) => {
13
- console.error(exception);
14
- throw new Error(exception);
15
- };
16
- });
17
- createInjector(["ng"]).invoke((_$compile_, _$rootScope_) => {
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
  });
@@ -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
- window["angular"]
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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI();
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,7 +1,7 @@
1
1
  import { forEach, isString } from "../../shared/utils";
2
2
 
3
- export function initMessageModule() {
4
- window["angular"]
3
+ export function initMessageModule(angular) {
4
+ angular
5
5
  .module("ngMessages", [])
6
6
 
7
7
  .directive("ngMessages", [
@@ -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 { publishExternalAPI } from "../../public";
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
- publishExternalAPI();
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 { publishExternalAPI } from "../public";
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
- publishExternalAPI();
11
- var injector = createInjector(["ng"]);
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 { publishExternalAPI } from "../public";
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
- publishExternalAPI();
10
- var injector = createInjector(["ng"]);
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 { publishExternalAPI } from "../public";
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
- publishExternalAPI();
14
- var injector = createInjector(["ng"]);
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 { publishExternalAPI } from "../public";
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
- publishExternalAPI();
10
- var injector = createInjector(["ng"]);
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
- publishExternalAPI();
717
- var injector = createInjector(["ng"]);
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, angularInit } from "./loader";
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
- angularInit(document);
7
+ angular.init(document);
14
8
  });