@angular-wave/angular.ts 0.4.3 → 0.4.4

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 (128) hide show
  1. package/dist/angular-ts.umd.js +10 -0
  2. package/index.html +74 -3
  3. package/package.json +1 -1
  4. package/src/angular.spec.js +0 -5
  5. package/src/animations/animate-css.js +5 -13
  6. package/src/animations/animate-queue.js +22 -21
  7. package/src/animations/animate-runner.js +4 -8
  8. package/src/animations/animate.md +1 -1
  9. package/src/animations/animate.spec.js +0 -21
  10. package/src/animations/animation.js +1 -1
  11. package/src/binding.spec.js +0 -1
  12. package/src/core/cache/cache.js +2 -29
  13. package/src/core/compile/compile.js +26 -27
  14. package/src/core/compile/compile.spec.js +17 -266
  15. package/src/core/compile/compile.test.js +1 -1
  16. package/src/core/controller/controller.js +2 -0
  17. package/src/core/di/injector.md +1 -1
  18. package/src/core/di/injector.spec.js +0 -2
  19. package/src/core/di/internal-injector.js +2 -1
  20. package/src/core/interpolate/interpolate.js +16 -3
  21. package/src/core/interpolate/interpolate.spec.js +70 -16
  22. package/src/core/interval/interval.test.js +1 -1
  23. package/src/core/location/location.js +0 -2
  24. package/src/core/location/location.spec.js +27 -27
  25. package/src/core/{scope/scope.html → model/model.html} +1 -1
  26. package/src/core/model/model.js +944 -0
  27. package/src/core/model/model.spec.js +3012 -0
  28. package/src/core/on.spec.js +0 -7
  29. package/src/core/parse/interpreter.js +10 -7
  30. package/src/core/parse/parse.js +26 -5
  31. package/src/core/parse/parse.spec.js +95 -91
  32. package/src/core/prop.spec.js +4 -60
  33. package/src/core/sce/sce.spec.js +0 -8
  34. package/src/core/scope/scope.js +61 -30
  35. package/src/core/scope/scope.spec.js +25 -1960
  36. package/src/directive/aria/aria.js +3 -6
  37. package/src/directive/aria/aria.spec.js +0 -87
  38. package/src/directive/attrs/attrs.spec.js +0 -5
  39. package/src/directive/attrs/boolean.spec.js +0 -15
  40. package/src/directive/attrs/element-style.spec.js +0 -8
  41. package/src/directive/attrs/src.spec.js +0 -7
  42. package/src/directive/bind/bind.spec.js +0 -33
  43. package/src/directive/bind/bing-html.spec.js +0 -3
  44. package/src/{core/q/q.html → directive/channel/channel.html} +1 -1
  45. package/src/directive/channel/channel.js +29 -0
  46. package/src/directive/channel/channel.spec.js +52 -0
  47. package/src/directive/{list/list.test.js → channel/channel.test.js} +2 -4
  48. package/src/directive/class/class.js +3 -3
  49. package/src/directive/class/class.spec.js +9 -75
  50. package/src/directive/controller/controller.spec.js +0 -13
  51. package/src/directive/events/click.spec.js +0 -3
  52. package/src/directive/events/event.spec.js +0 -6
  53. package/src/directive/form/form.js +2 -3
  54. package/src/directive/form/form.spec.js +0 -65
  55. package/src/directive/if/if.spec.js +0 -4
  56. package/src/directive/include/include.spec.js +8 -59
  57. package/src/directive/init/init.js +6 -2
  58. package/src/directive/init/init.spec.js +0 -2
  59. package/src/directive/input/input.spec.js +0 -136
  60. package/src/directive/messages/messages.spec.js +4 -35
  61. package/src/directive/model/model.js +18 -25
  62. package/src/directive/model/model.spec.js +2 -49
  63. package/src/directive/model-options/model-options.spec.js +0 -6
  64. package/src/directive/non-bindable/non-bindable.spec.js +0 -1
  65. package/src/directive/observe/observe.js +0 -1
  66. package/src/directive/observe/observe.spec.js +0 -1
  67. package/src/directive/options/options.spec.js +0 -34
  68. package/src/directive/ref/href.spec.js +0 -15
  69. package/src/directive/repeat/repeat.spec.js +8 -135
  70. package/src/directive/script/script.spec.js +0 -2
  71. package/src/directive/select/select.js +3 -3
  72. package/src/directive/select/select.spec.js +0 -96
  73. package/src/directive/show-hide/show-hide.js +2 -2
  74. package/src/directive/show-hide/show-hide.spec.js +8 -19
  75. package/src/directive/style/style.spec.js +0 -7
  76. package/src/directive/switch/switch.spec.js +5 -5
  77. package/src/directive/validators/validators.spec.js +0 -1
  78. package/src/loader.js +0 -1
  79. package/src/public.js +75 -80
  80. package/src/router/common/coreservices.js +0 -2
  81. package/src/router/directives/state-directives.js +6 -14
  82. package/src/router/directives/state-directives.spec.js +0 -83
  83. package/src/router/directives/view-directive.js +4 -13
  84. package/src/router/directives/view-directive.spec.js +25 -71
  85. package/src/router/hooks/lazy-load.js +2 -2
  86. package/src/router/hooks/views.js +3 -5
  87. package/src/router/resolve/resolvable.js +3 -6
  88. package/src/router/resolve/resolve-context.js +2 -2
  89. package/src/router/state/state-service.js +4 -4
  90. package/src/router/state/state.spec.js +2 -5
  91. package/src/router/state/views.js +7 -10
  92. package/src/router/template-factory.js +3 -6
  93. package/src/router/template-factory.spec.js +0 -4
  94. package/src/router/transition/transition-hook.js +1 -1
  95. package/src/router/transition/transition.js +1 -1
  96. package/src/router/view-hook.spec.js +2 -2
  97. package/src/router/view-scroll.js +4 -6
  98. package/src/services/http/http.js +6 -9
  99. package/src/services/http/http.spec.js +30 -31
  100. package/src/services/http/template-request.spec.js +0 -10
  101. package/src/services/http-backend/http-backend.spec.js +3 -3
  102. package/src/services/template-request.js +2 -4
  103. package/src/shared/common.js +1 -2
  104. package/src/shared/jqlite/jqlite.js +0 -3
  105. package/types/core/cache/cache.d.ts +1 -1
  106. package/types/core/model/model.d.ts +204 -0
  107. package/types/core/parse/parse.d.ts +26 -0
  108. package/types/core/scope/scope.d.ts +22 -21
  109. package/types/directive/channel/channel.d.ts +11 -0
  110. package/src/core/interval/interval-factory.js +0 -50
  111. package/src/core/interval/interval.html +0 -18
  112. package/src/core/interval/interval.js +0 -77
  113. package/src/core/interval/interval.md +0 -123
  114. package/src/core/interval/interval.spec.js +0 -280
  115. package/src/core/q/q.js +0 -472
  116. package/src/core/q/q.md +0 -211
  117. package/src/core/q/q.spec.js +0 -2748
  118. package/src/core/q/q.test.js +0 -12
  119. package/src/core/scope/scope.test.js +0 -12
  120. package/src/core/timeout/timeout.html +0 -18
  121. package/src/core/timeout/timeout.js +0 -109
  122. package/src/core/timeout/timeout.spec.js +0 -354
  123. package/src/core/timeout/timout.test.js +0 -12
  124. package/src/directive/list/list.html +0 -18
  125. package/src/directive/list/list.js +0 -46
  126. package/src/directive/list/list.md +0 -22
  127. package/src/directive/list/list.spec.js +0 -172
  128. package/types/directive/list/list.d.ts +0 -4
@@ -24,37 +24,31 @@ describe("ng-style", () => {
24
24
 
25
25
  it("should set", () => {
26
26
  element = $compile("<div ng-style=\"{height: '40px'}\"></div>")($scope);
27
- $scope.$digest();
28
27
  expect(element[0].style.height).toEqual("40px");
29
28
  });
30
29
 
31
30
  it("should silently ignore undefined style", () => {
32
31
  element = $compile('<div ng-style="myStyle"></div>')($scope);
33
- $scope.$digest();
34
32
  expect(element[0].classList.contains("ng-exception")).toBeFalsy();
35
33
  });
36
34
 
37
35
  it("should not deep watch objects", () => {
38
36
  element = $compile('<div ng-style="{height: heightObj}"></div>')($scope);
39
- $scope.$digest();
40
37
  expect(parseInt(element[0].style.height + 0, 10)).toEqual(0); // height could be '' or '0px'
41
38
  $scope.heightObj = {
42
39
  toString() {
43
40
  return "40px";
44
41
  },
45
42
  };
46
- $scope.$digest();
47
43
  expect(element[0].style.height).toBe("40px");
48
44
 
49
45
  element[0].style.height = "10px";
50
46
  $scope.heightObj.otherProp = 123;
51
- $scope.$digest();
52
47
  expect(element[0].style.height).toBe("10px");
53
48
  });
54
49
 
55
50
  it("should support binding for object literals", () => {
56
51
  element = $compile('<div ng-style="{height: heightStr}"></div>')($scope);
57
- $scope.$digest();
58
52
  expect(parseInt(element[0].style.height + 0, 10)).toEqual(0); // height could be '' or '0px'
59
53
  $scope.$apply('heightStr = "40px"');
60
54
  expect(element[0].style.height).toBe("40px");
@@ -65,7 +59,6 @@ describe("ng-style", () => {
65
59
 
66
60
  it("should support lazy one-time binding for object literals", () => {
67
61
  element = $compile('<div ng-style="::{height: heightStr}"></div>')($scope);
68
- $scope.$digest();
69
62
  expect(parseInt(element[0].style.height + 0, 10)).toEqual(0); // height could be '' or '0px'
70
63
  $scope.$apply('heightStr = "40px"');
71
64
  expect(element[0].style.height).toBe("40px");
@@ -570,9 +570,9 @@ describe("ngSwitch", () => {
570
570
  // ),
571
571
  // )($scope);
572
572
 
573
- // $rootScope.$digest(); // re-enable the animations;
573
+ // ; // re-enable the animations;
574
574
  // $scope.val = "one";
575
- // $scope.$digest();
575
+ // ;
576
576
 
577
577
  // item = $animate.queue.shift();
578
578
  // expect(item.event).toBe("enter");
@@ -596,16 +596,16 @@ describe("ngSwitch", () => {
596
596
  // ),
597
597
  // )($scope);
598
598
 
599
- // $rootScope.$digest(); // re-enable the animations;
599
+ // ; // re-enable the animations;
600
600
  // $scope.val = "two";
601
- // $scope.$digest();
601
+ // ;
602
602
 
603
603
  // item = $animate.queue.shift();
604
604
  // expect(item.event).toBe("enter");
605
605
  // expect(item.element.text()).toBe("two");
606
606
 
607
607
  // $scope.val = "three";
608
- // $scope.$digest();
608
+ // ;
609
609
 
610
610
  // item = $animate.queue.shift();
611
611
  // expect(item.event).toBe("leave");
@@ -640,7 +640,6 @@ describe("validators", () => {
640
640
  inputElm = $compile(
641
641
  '<input type="text" ng-model="notDefined" required />',
642
642
  )($rootScope);
643
- $rootScope.$digest();
644
643
  expect(inputElm[0].classList.contains("ng-invalid")).toBeTrue();
645
644
  });
646
645
 
package/src/loader.js CHANGED
@@ -152,7 +152,6 @@ export class Angular {
152
152
  });
153
153
  // ng-route deps
154
154
  services.$injector = $injector;
155
- services.$q = $injector.get("$q");
156
155
  // https://github.com/angular-ui/ui-router/issues/3678
157
156
  if (!Object.prototype.hasOwnProperty.call($injector, "strictDi")) {
158
157
  try {
package/src/public.js CHANGED
@@ -1,93 +1,88 @@
1
- import { CompileProvider } from "./core/compile/compile";
1
+ import { CompileProvider } from "./core/compile/compile.js";
2
2
  import {
3
3
  inputDirective,
4
4
  ngValueDirective,
5
5
  hiddenInputBrowserCacheDirective,
6
- } from "./directive/input/input";
7
- import { formDirective, ngFormDirective } from "./directive/form/form";
8
- import { scriptDirective } from "./directive/script/script";
9
- import { selectDirective, optionDirective } from "./directive/select/select";
6
+ } from "./directive/input/input.js";
7
+ import { formDirective, ngFormDirective } from "./directive/form/form.js";
8
+ import { scriptDirective } from "./directive/script/script.js";
9
+ import { selectDirective, optionDirective } from "./directive/select/select.js";
10
10
  import {
11
11
  ngBindDirective,
12
12
  ngBindHtmlDirective,
13
13
  ngBindTemplateDirective,
14
- } from "./directive/bind/bind";
14
+ } from "./directive/bind/bind.js";
15
15
  import {
16
16
  ngClassDirective,
17
17
  ngClassEvenDirective,
18
18
  ngClassOddDirective,
19
- } from "./directive/class/class";
20
- import { ngCloakDirective } from "./directive/cloak/cloak";
21
- import { ngControllerDirective } from "./directive/controller/controller";
19
+ } from "./directive/class/class.js";
20
+ import { ngCloakDirective } from "./directive/cloak/cloak.js";
21
+ import { ngControllerDirective } from "./directive/controller/controller.js";
22
22
  import {
23
23
  ngHideDirective,
24
24
  ngShowDirective,
25
- } from "./directive/show-hide/show-hide";
26
- import { ngIfDirective } from "./directive/if/if";
25
+ } from "./directive/show-hide/show-hide.js";
26
+ import { ngIfDirective } from "./directive/if/if.js";
27
27
  import {
28
28
  ngIncludeDirective,
29
29
  ngIncludeFillContentDirective,
30
- } from "./directive/include/include";
31
- import { ngInitDirective } from "./directive/init/init";
32
- import { ngNonBindableDirective } from "./directive/non-bindable/non-bindable";
33
- import { ngRefDirective } from "./directive/ref/ref";
34
- import { ngRepeatDirective } from "./directive/repeat/repeat";
35
- import { ngStyleDirective } from "./directive/style/style";
30
+ } from "./directive/include/include.js";
31
+ import { ngInitDirective } from "./directive/init/init.js";
32
+ import { ngNonBindableDirective } from "./directive/non-bindable/non-bindable.js";
33
+ import { ngRefDirective } from "./directive/ref/ref.js";
34
+ import { ngRepeatDirective } from "./directive/repeat/repeat.js";
35
+ import { ngStyleDirective } from "./directive/style/style.js";
36
36
  import {
37
37
  ngSwitchDirective,
38
38
  ngSwitchWhenDirective,
39
39
  ngSwitchDefaultDirective,
40
- } from "./directive/switch/switch";
41
- import { ngOptionsDirective } from "./directive/options/options";
42
- import { ngTranscludeDirective } from "./directive/transclude/transclude";
43
- import { ngModelDirective } from "./directive/model/model";
44
- import { ngListDirective } from "./directive/list/list";
45
- import { ngChangeDirective } from "./directive/change/change";
40
+ } from "./directive/switch/switch.js";
41
+ import { ngOptionsDirective } from "./directive/options/options.js";
42
+ import { ngTranscludeDirective } from "./directive/transclude/transclude.js";
43
+ import { ngModelDirective } from "./directive/model/model.js";
44
+ import { ngChangeDirective } from "./directive/change/change.js";
46
45
  import {
47
46
  maxlengthDirective,
48
47
  minlengthDirective,
49
48
  patternDirective,
50
49
  requiredDirective,
51
- } from "./directive/validators/validators";
52
- import { ngModelOptionsDirective } from "./directive/model-options/model-options";
53
- import { ngAttributeAliasDirectives } from "./directive/attrs/attrs";
54
- import { ngEventDirectives } from "./directive/events/events";
55
- import { AnchorScrollProvider } from "./services/anchor-scroll";
56
- import { AnimateProvider } from "./animations/animate";
57
- import { BrowserProvider } from "./services/browser";
50
+ } from "./directive/validators/validators.js";
51
+ import { ngModelOptionsDirective } from "./directive/model-options/model-options.js";
52
+ import { ngAttributeAliasDirectives } from "./directive/attrs/attrs.js";
53
+ import { ngEventDirectives } from "./directive/events/events.js";
54
+ import { AnchorScrollProvider } from "./services/anchor-scroll.js";
55
+ import { AnimateProvider } from "./animations/animate.js";
56
+ import { BrowserProvider } from "./services/browser.js";
58
57
  import {
59
58
  AnimateAsyncRunFactoryProvider,
60
59
  AnimateRunnerFactoryProvider,
61
- } from "./animations/animate-runner";
62
- import { TemplateCacheProvider } from "./core/cache/cache-factory";
63
- import { ControllerProvider } from "./core/controller/controller";
64
- import { ExceptionHandlerProvider } from "./core/exception-handler";
65
- import { FilterProvider } from "./core/filter/filter";
66
- import { IntervalProvider } from "./core/interval/interval";
67
- import { InterpolateProvider } from "./core/interpolate/interpolate";
68
- import { $IntervalFactoryProvider } from "./core/interval/interval-factory";
60
+ } from "./animations/animate-runner.js";
61
+ import { TemplateCacheProvider } from "./core/cache/cache-factory.js";
62
+ import { ControllerProvider } from "./core/controller/controller.js";
63
+ import { ExceptionHandlerProvider } from "./core/exception-handler.js";
64
+ import { FilterProvider } from "./core/filter/filter.js";
65
+ import { InterpolateProvider } from "./core/interpolate/interpolate.js";
69
66
  import {
70
67
  HttpProvider,
71
68
  HttpParamSerializerProvider,
72
- } from "./services/http/http";
73
- import { HttpBackendProvider } from "./services/http-backend/http-backend";
74
- import { LocationProvider } from "./core/location/location";
75
- import { LogProvider } from "./services/log";
69
+ } from "./services/http/http.js";
70
+ import { HttpBackendProvider } from "./services/http-backend/http-backend.js";
71
+ import { LocationProvider } from "./core/location/location.js";
72
+ import { LogProvider } from "./services/log.js";
76
73
  import { ParseProvider } from "./core/parse/parse.js";
77
- import { RootScopeProvider } from "./core/scope/scope";
78
- import { $QProvider } from "./core/q/q";
79
- import { SceProvider, SceDelegateProvider } from "./core/sce/sce";
80
- import { TaskTrackerFactoryProvider } from "./core/task-tracker-factory";
81
- import { TemplateRequestProvider } from "./services/template-request";
82
- import { TimeoutProvider } from "./core/timeout/timeout";
83
- import { SanitizeUriProvider } from "./core/sanitize/sanitize-uri";
74
+ import { RootModelProvider } from "./core/model/model.js";
75
+ import { SceProvider, SceDelegateProvider } from "./core/sce/sce.js";
76
+ import { TaskTrackerFactoryProvider } from "./core/task-tracker-factory.js";
77
+ import { TemplateRequestProvider } from "./services/template-request.js";
78
+ import { SanitizeUriProvider } from "./core/sanitize/sanitize-uri.js";
84
79
  import {
85
80
  ngMessageDefaultDirective,
86
81
  ngMessageDirective,
87
82
  ngMessageExpDirective,
88
83
  ngMessagesDirective,
89
84
  ngMessagesIncludeDirective,
90
- } from "./directive/messages/messages";
85
+ } from "./directive/messages/messages.js";
91
86
  import {
92
87
  AriaProvider,
93
88
  ngCheckedAriaDirective,
@@ -101,34 +96,38 @@ import {
101
96
  ngRequiredAriaDirective,
102
97
  ngShowAriaDirective,
103
98
  ngValueAriaDirective,
104
- } from "./directive/aria/aria";
105
- import { AnimateCssProvider } from "./animations/animate-css";
106
- import { AnimateQueueProvider } from "./animations/animate-queue";
107
- import { AnimateJsProvider } from "./animations/animate-js";
108
- import { AnimationProvider } from "./animations/animation";
109
- import { RafSchedulerProvider } from "./animations/raf-scheduler";
110
- import { AnimateCacheProvider } from "./animations/animate-cache";
111
- import { AnimateCssDriverProvider } from "./animations/animate-css-driver";
112
- import { AnimateJsDriverProvider } from "./animations/animate-js-driver";
113
- import { ngAnimateSwapDirective } from "./animations/animate-swap";
114
- import { $$AnimateChildrenDirective } from "./animations/animate-children-directive";
115
- import { UrlConfigProvider } from "./router/url/url-config";
116
- import { UIRouterGlobals } from "./router/globals";
117
- import { ViewService } from "./router/view/view";
118
- import { TransitionProvider } from "./router/transition/transition-service";
119
- import { StateProvider } from "./router/state/state-service";
120
- import { ViewScrollProvider } from "./router/view-scroll";
121
- import { TemplateFactoryProvider } from "./router/template-factory";
122
- import { UrlService } from "./router/url/url-service";
123
- import { StateRegistryProvider } from "./router/state/state-registry";
124
- import { trace } from "./router/common/trace";
99
+ } from "./directive/aria/aria.js";
100
+ import { AnimateCssProvider } from "./animations/animate-css.js";
101
+ import { AnimateQueueProvider } from "./animations/animate-queue.js";
102
+ import { AnimateJsProvider } from "./animations/animate-js.js";
103
+ import { AnimationProvider } from "./animations/animation.js";
104
+ import { RafSchedulerProvider } from "./animations/raf-scheduler.js";
105
+ import { AnimateCacheProvider } from "./animations/animate-cache.js";
106
+ import { AnimateCssDriverProvider } from "./animations/animate-css-driver.js";
107
+ import { AnimateJsDriverProvider } from "./animations/animate-js-driver.js";
108
+ import { ngAnimateSwapDirective } from "./animations/animate-swap.js";
109
+ import { $$AnimateChildrenDirective } from "./animations/animate-children-directive.js";
110
+ import { UrlConfigProvider } from "./router/url/url-config.js";
111
+ import { UIRouterGlobals } from "./router/globals.js";
112
+ import { ViewService } from "./router/view/view.js";
113
+ import { TransitionProvider } from "./router/transition/transition-service.js";
114
+ import { StateProvider } from "./router/state/state-service.js";
115
+ import { ViewScrollProvider } from "./router/view-scroll.js";
116
+ import { TemplateFactoryProvider } from "./router/template-factory.js";
117
+ import { UrlService } from "./router/url/url-service.js";
118
+ import { StateRegistryProvider } from "./router/state/state-registry.js";
119
+ import { trace } from "./router/common/trace.js";
125
120
  import {
126
121
  $StateRefActiveDirective,
127
122
  $StateRefDirective,
128
123
  $StateRefDynamicDirective,
129
- } from "./router/directives/state-directives";
130
- import { $ViewDirectiveFill, ngView } from "./router/directives/view-directive";
131
- import { ngObserveDirective } from "./directive/observe/observe";
124
+ } from "./router/directives/state-directives.js";
125
+ import {
126
+ $ViewDirectiveFill,
127
+ ngView,
128
+ } from "./router/directives/view-directive.js";
129
+ import { ngObserveDirective } from "./directive/observe/observe.js";
130
+ import { ngChannelDirective } from "./directive/channel/channel.js";
132
131
 
133
132
  /**
134
133
  * @type {string} `version` from `package.json`, injected by Rollup plugin
@@ -192,7 +191,6 @@ export function publishExternalAPI(angular) {
192
191
  ngOptions: ngOptionsDirective,
193
192
  ngTransclude: ngTranscludeDirective,
194
193
  ngModel: ngModelDirective,
195
- ngList: ngListDirective,
196
194
  ngChange: ngChangeDirective,
197
195
  pattern: patternDirective,
198
196
  ngPattern: patternDirective,
@@ -225,6 +223,7 @@ export function publishExternalAPI(angular) {
225
223
  ngSrefActiveEq: $StateRefActiveDirective,
226
224
  ngState: $StateRefDynamicDirective,
227
225
  ngView: ngView,
226
+ ngChannel: ngChannelDirective,
228
227
  })
229
228
  .directive({
230
229
  ngView: $ViewDirectiveFill,
@@ -249,8 +248,6 @@ export function publishExternalAPI(angular) {
249
248
  $exceptionHandler: ExceptionHandlerProvider,
250
249
  $filter: FilterProvider,
251
250
  $interpolate: InterpolateProvider,
252
- $interval: IntervalProvider,
253
- $$intervalFactory: $IntervalFactoryProvider,
254
251
  $http: HttpProvider,
255
252
  $httpParamSerializer: HttpParamSerializerProvider,
256
253
  $httpBackend: HttpBackendProvider,
@@ -258,15 +255,13 @@ export function publishExternalAPI(angular) {
258
255
  $log: LogProvider,
259
256
  $parse: ParseProvider,
260
257
  $$rAFScheduler: RafSchedulerProvider,
261
- $rootScope: RootScopeProvider,
258
+ $rootScope: RootModelProvider,
262
259
  $routerGlobals: UIRouterGlobals,
263
- $q: $QProvider,
264
260
  $sce: SceProvider,
265
261
  $sceDelegate: SceDelegateProvider,
266
262
  $$taskTrackerFactory: TaskTrackerFactoryProvider,
267
263
  $templateCache: TemplateCacheProvider,
268
264
  $templateRequest: TemplateRequestProvider,
269
- $timeout: TimeoutProvider,
270
265
  $urlConfig: UrlConfigProvider,
271
266
  $view: ViewService,
272
267
  $transitions: TransitionProvider,
@@ -1,6 +1,4 @@
1
1
  export const services = {
2
- /** @type {import("../../core/q/q").QService} */
3
- $q: undefined,
4
2
  /** @type {import("../../core/di/internal-injector").InjectorService} */
5
3
  $injector: undefined,
6
4
  };
@@ -43,7 +43,7 @@ function getTypeInfo(el) {
43
43
  };
44
44
  }
45
45
  /** @ignore */
46
- function clickHook(el, $state, $timeout, type, getDef) {
46
+ function clickHook(el, $state, type, getDef) {
47
47
  return function (e) {
48
48
  const button = e.which || e.button,
49
49
  target = getDef();
@@ -57,7 +57,7 @@ function clickHook(el, $state, $timeout, type, getDef) {
57
57
  el.attr("target");
58
58
  if (!res) {
59
59
  // HACK: This is to allow ng-clicks to be processed before the transition is initiated:
60
- const transition = $timeout(function () {
60
+ const transition = setTimeout(function () {
61
61
  if (!el.attr("disabled")) {
62
62
  $state.go(target.ngState, target.ngStateParams, target.ngStateOpts);
63
63
  }
@@ -66,7 +66,7 @@ function clickHook(el, $state, $timeout, type, getDef) {
66
66
  // if the state has no URL, ignore one preventDefault from the <a> directive.
67
67
  let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;
68
68
  e.preventDefault = function () {
69
- if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);
69
+ if (ignorePreventDefaultCount-- <= 0) clearTimeout(transition);
70
70
  };
71
71
  } else {
72
72
  // ignored
@@ -106,15 +106,9 @@ function bindEvents(element, scope, hookFn, ngStateOpts) {
106
106
 
107
107
  // // TODO: SEPARATE THESE OUT
108
108
 
109
- $StateRefDirective.$inject = [
110
- "$state",
111
- "$timeout",
112
- "$stateRegistry",
113
- "$transitions",
114
- ];
109
+ $StateRefDirective.$inject = ["$state", "$stateRegistry", "$transitions"];
115
110
  export function $StateRefDirective(
116
111
  $stateService,
117
- $timeout,
118
112
  $stateRegistry,
119
113
  $transitions,
120
114
  ) {
@@ -155,7 +149,7 @@ export function $StateRefDirective(
155
149
  scope.$on("$destroy", $stateRegistry.onStatesChanged(update));
156
150
  scope.$on("$destroy", $transitions.onSuccess({}, update));
157
151
  if (!type.clickable) return;
158
- const hookFn = clickHook(element, $state, $timeout, type, getDef);
152
+ const hookFn = clickHook(element, $state, type, getDef);
159
153
  bindEvents(element, scope, hookFn, rawDef.ngStateOpts);
160
154
  },
161
155
  };
@@ -163,13 +157,11 @@ export function $StateRefDirective(
163
157
 
164
158
  $StateRefDynamicDirective.$inject = [
165
159
  "$state",
166
- "$timeout",
167
160
  "$stateRegistry",
168
161
  "$transitions",
169
162
  ];
170
163
  export function $StateRefDynamicDirective(
171
164
  $state,
172
- $timeout,
173
165
  $stateRegistry,
174
166
  $transitions,
175
167
  ) {
@@ -213,7 +205,7 @@ export function $StateRefDynamicDirective(
213
205
  scope.$on("$destroy", $stateRegistry.onStatesChanged(update));
214
206
  scope.$on("$destroy", $transitions.onSuccess({}, update));
215
207
  if (!type.clickable) return;
216
- hookFn = clickHook(element, $state, $timeout, type, getDef);
208
+ hookFn = clickHook(element, $state, type, getDef);
217
209
  bindEvents(element, scope, hookFn, rawDef.ngStateOpts);
218
210
  },
219
211
  };