@angular-wave/angular.ts 0.4.2 → 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 (150) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +12 -2
  3. package/index.html +74 -3
  4. package/package.json +7 -7
  5. package/src/angular.spec.js +1 -269
  6. package/src/animations/animate-css-driver.js +2 -2
  7. package/src/animations/animate-css.js +12 -21
  8. package/src/animations/animate-js-driver.js +1 -3
  9. package/src/animations/animate-js.js +4 -4
  10. package/src/animations/animate-queue.js +23 -23
  11. package/src/animations/animate-runner.js +4 -8
  12. package/src/animations/animate.md +1 -1
  13. package/src/animations/animate.spec.js +0 -21
  14. package/src/animations/animation.js +4 -4
  15. package/src/animations/shared.js +14 -12
  16. package/src/binding.spec.js +0 -1
  17. package/src/core/cache/cache.js +2 -29
  18. package/src/core/compile/attributes.js +2 -3
  19. package/src/core/compile/compile.js +260 -245
  20. package/src/core/compile/compile.spec.js +63 -317
  21. package/src/core/compile/compile.test.js +1 -1
  22. package/src/core/controller/controller.js +2 -0
  23. package/src/core/di/injector.md +1 -1
  24. package/src/core/di/injector.spec.js +0 -2
  25. package/src/core/di/internal-injector.js +2 -1
  26. package/src/core/interpolate/interpolate.js +16 -3
  27. package/src/core/interpolate/interpolate.spec.js +70 -16
  28. package/src/core/location/location.js +0 -2
  29. package/src/core/location/location.spec.js +27 -27
  30. package/src/core/{scope/scope.html → model/model.html} +1 -1
  31. package/src/core/model/model.js +944 -0
  32. package/src/core/model/model.spec.js +3012 -0
  33. package/src/core/on.spec.js +0 -7
  34. package/src/core/parse/interpreter.js +10 -7
  35. package/src/core/parse/parse.js +28 -7
  36. package/src/core/parse/parse.spec.js +95 -91
  37. package/src/core/prop.spec.js +4 -60
  38. package/src/core/sce/sce.js +1 -2
  39. package/src/core/sce/sce.spec.js +0 -8
  40. package/src/core/scope/scope.js +62 -32
  41. package/src/core/scope/scope.spec.js +25 -1960
  42. package/src/directive/aria/aria.js +3 -6
  43. package/src/directive/aria/aria.spec.js +0 -87
  44. package/src/directive/attrs/attrs.spec.js +0 -5
  45. package/src/directive/{list/list.test.js → attrs/attrs.test.js} +1 -1
  46. package/src/{core/q/q.html → directive/attrs/boolean.html} +1 -1
  47. package/src/directive/attrs/boolean.spec.js +0 -15
  48. package/src/{core/q/q.test.js → directive/attrs/boolean.test.js} +1 -2
  49. package/src/{core/timeout/timeout.html → directive/attrs/element-style.html} +4 -1
  50. package/src/directive/attrs/element-style.spec.js +0 -8
  51. package/src/{core/scope/scope.test.js → directive/attrs/element-style.test.js} +1 -2
  52. package/src/directive/attrs/src.spec.js +0 -7
  53. package/src/directive/bind/bind.spec.js +0 -33
  54. package/src/directive/bind/bing-html.spec.js +1 -4
  55. package/src/{core/interval/interval.html → directive/channel/channel.html} +1 -1
  56. package/src/directive/channel/channel.js +29 -0
  57. package/src/directive/channel/channel.spec.js +52 -0
  58. package/src/directive/channel/channel.test.js +9 -0
  59. package/src/directive/class/class.js +3 -3
  60. package/src/directive/class/class.spec.js +9 -75
  61. package/src/directive/controller/controller.spec.js +0 -13
  62. package/src/directive/events/click.spec.js +0 -3
  63. package/src/directive/events/event.spec.js +0 -6
  64. package/src/directive/form/form.js +14 -22
  65. package/src/directive/form/form.spec.js +0 -65
  66. package/src/directive/if/if.spec.js +2 -7
  67. package/src/directive/if/if.test.js +1 -2
  68. package/src/directive/include/include.js +2 -2
  69. package/src/directive/include/include.spec.js +8 -59
  70. package/src/directive/init/init.js +6 -2
  71. package/src/directive/init/init.spec.js +0 -2
  72. package/src/directive/input/input.js +1 -2
  73. package/src/directive/input/input.spec.js +191 -331
  74. package/src/directive/messages/messages.spec.js +4 -35
  75. package/src/directive/model/model.js +30 -42
  76. package/src/directive/model/model.spec.js +2 -49
  77. package/src/directive/model-options/model-options.js +22 -26
  78. package/src/directive/model-options/model-options.spec.js +0 -6
  79. package/src/directive/non-bindable/non-bindable.spec.js +0 -1
  80. package/src/directive/observe/observe.js +0 -1
  81. package/src/directive/observe/observe.spec.js +0 -1
  82. package/src/directive/options/options.js +1 -3
  83. package/src/directive/options/options.spec.js +3 -38
  84. package/src/directive/ref/href.spec.js +0 -15
  85. package/src/directive/repeat/repeat.js +2 -2
  86. package/src/directive/repeat/repeat.spec.js +56 -192
  87. package/src/directive/script/script.spec.js +0 -2
  88. package/src/directive/select/select.js +3 -3
  89. package/src/directive/select/select.spec.js +9 -106
  90. package/src/directive/show-hide/show-hide.js +2 -2
  91. package/src/directive/show-hide/show-hide.spec.js +8 -19
  92. package/src/directive/style/style.spec.js +0 -7
  93. package/src/directive/switch/switch.js +1 -2
  94. package/src/directive/switch/switch.spec.js +5 -5
  95. package/src/directive/validators/validators.spec.js +0 -1
  96. package/src/loader.js +0 -1
  97. package/src/public.js +75 -80
  98. package/src/router/common/coreservices.js +0 -2
  99. package/src/router/directives/state-directives.js +24 -30
  100. package/src/router/directives/state-directives.spec.js +0 -83
  101. package/src/router/directives/view-directive.js +6 -15
  102. package/src/router/directives/view-directive.spec.js +25 -71
  103. package/src/router/hooks/lazy-load.js +2 -2
  104. package/src/router/hooks/views.js +3 -5
  105. package/src/router/resolve/resolvable.js +3 -6
  106. package/src/router/resolve/resolve-context.js +2 -2
  107. package/src/router/state/state-service.js +4 -4
  108. package/src/router/state/state.spec.js +2 -5
  109. package/src/router/state/views.js +9 -12
  110. package/src/router/template-factory.js +3 -6
  111. package/src/router/template-factory.spec.js +0 -4
  112. package/src/router/transition/transition-hook.js +1 -1
  113. package/src/router/transition/transition.js +1 -1
  114. package/src/router/url/url-service.js +2 -8
  115. package/src/router/url/url-service.spec.js +3 -4
  116. package/src/router/view-hook.spec.js +2 -2
  117. package/src/router/view-scroll.js +4 -6
  118. package/src/services/http/http.js +11 -15
  119. package/src/services/http/http.spec.js +30 -31
  120. package/src/services/http/template-request.spec.js +0 -10
  121. package/src/services/http-backend/http-backend.js +19 -17
  122. package/src/services/http-backend/http-backend.spec.js +3 -3
  123. package/src/services/template-request.js +2 -4
  124. package/src/shared/common.js +6 -10
  125. package/src/shared/jqlite/jqlite.js +14 -15
  126. package/src/shared/jqlite/jqlite.spec.js +2 -2
  127. package/src/shared/utils.js +15 -92
  128. package/types/core/cache/cache.d.ts +1 -1
  129. package/types/core/model/model.d.ts +204 -0
  130. package/types/core/parse/parse.d.ts +26 -0
  131. package/types/core/scope/scope.d.ts +22 -21
  132. package/types/directive/channel/channel.d.ts +11 -0
  133. package/types/directive/form/form.d.ts +1 -0
  134. package/types/shared/common.d.ts +0 -1
  135. package/types/shared/utils.d.ts +0 -35
  136. package/src/core/interval/interval-factory.js +0 -50
  137. package/src/core/interval/interval.js +0 -77
  138. package/src/core/interval/interval.md +0 -123
  139. package/src/core/interval/interval.spec.js +0 -280
  140. package/src/core/q/q.js +0 -472
  141. package/src/core/q/q.md +0 -211
  142. package/src/core/q/q.spec.js +0 -2748
  143. package/src/core/timeout/timeout.js +0 -109
  144. package/src/core/timeout/timeout.spec.js +0 -354
  145. package/src/core/timeout/timout.test.js +0 -12
  146. package/src/directive/list/list.html +0 -18
  147. package/src/directive/list/list.js +0 -46
  148. package/src/directive/list/list.md +0 -22
  149. package/src/directive/list/list.spec.js +0 -172
  150. package/types/directive/list/list.d.ts +0 -4
@@ -53,8 +53,6 @@ describe("form", () => {
53
53
  "</form>",
54
54
  )(scope);
55
55
  scope.inputPresent = true;
56
- scope.$digest();
57
-
58
56
  const form = scope.myForm;
59
57
  control.$setValidity("required", false);
60
58
 
@@ -115,8 +113,6 @@ describe("form", () => {
115
113
  "</form>",
116
114
  )(scope);
117
115
 
118
- scope.$digest();
119
-
120
116
  const form = scope.myForm;
121
117
 
122
118
  const input = doc.find("input").eq(0);
@@ -158,8 +154,6 @@ describe("form", () => {
158
154
  '<form name="otherForm"></form>',
159
155
  )(scope);
160
156
 
161
- scope.$digest();
162
-
163
157
  const form = scope.myForm;
164
158
  const { otherForm } = scope;
165
159
  const { childControl } = form;
@@ -173,15 +167,11 @@ describe("form", () => {
173
167
 
174
168
  // rename the childControl
175
169
  scope.controlName = "childControlMoved";
176
- scope.$digest();
177
-
178
170
  expect(form.childControlMoved).toBeUndefined();
179
171
  expect(otherForm.childControl).toBeUndefined();
180
172
  expect(otherForm.childControlMoved).toBe(childControl);
181
173
 
182
174
  scope.hasChildControl = false;
183
- scope.$digest();
184
-
185
175
  expect(form.childControlMoved).toBeUndefined();
186
176
  expect(otherForm.childControlMoved).toBeUndefined();
187
177
  });
@@ -195,7 +185,6 @@ describe("form", () => {
195
185
  "</form></div>",
196
186
  )(scope);
197
187
 
198
- scope.$digest();
199
188
  expect(scope.ctrl.myForm).toBeUndefined();
200
189
 
201
190
  scope.$apply("formPresent = true");
@@ -256,7 +245,6 @@ describe("form", () => {
256
245
  </form>
257
246
  </div>
258
247
  `)(scope);
259
- scope.$digest();
260
248
  expect(scope.formA.$error.required.length).toBe(1);
261
249
  expect(scope.formA.$error.required).toEqual([scope.formA.firstName]);
262
250
  expect(scope.formB.$error.required.length).toBe(1);
@@ -310,8 +298,6 @@ describe("form", () => {
310
298
  '<input type="text" ng-model="name" />' +
311
299
  "</form>",
312
300
  )(scope);
313
- scope.$digest();
314
-
315
301
  const inputElm = form.find("input").eq(0);
316
302
 
317
303
  inputElm[0].setAttribute("value", "a");
@@ -331,8 +317,6 @@ describe("form", () => {
331
317
  "</div>" +
332
318
  "</form>",
333
319
  )(scope);
334
- scope.$digest();
335
-
336
320
  const inputElm = form.find("input").eq(0);
337
321
  inputElm[0].setAttribute("value", "a");
338
322
  inputElm[0].dispatchEvent(new Event("change"));
@@ -350,8 +334,6 @@ describe("form", () => {
350
334
  '<input type="text" ng-model="name" />' +
351
335
  "</form>",
352
336
  )(scope);
353
- scope.$digest();
354
-
355
337
  const inputElm = form.find("input").eq(0);
356
338
  inputElm[0].setAttribute("value", "a");
357
339
  inputElm[0].dispatchEvent(new Event("change"));
@@ -373,8 +355,6 @@ describe("form", () => {
373
355
  '<button ng-click="test.$rollbackViewValue()" />' +
374
356
  "</form>",
375
357
  )(scope);
376
- scope.$digest();
377
-
378
358
  const inputElm = form.find("input").eq(0);
379
359
  inputElm[0].setAttribute("value", "a");
380
360
  inputElm[0].dispatchEvent(new Event("click"));
@@ -394,8 +374,6 @@ describe("form", () => {
394
374
  '<button ng-click="test.$rollbackViewValue()" />' +
395
375
  "</form>",
396
376
  )(scope);
397
- scope.$digest();
398
-
399
377
  const inputElm = form.find("input").eq(0);
400
378
  inputElm[0].setAttribute("value", "a");
401
379
  inputElm[0].dispatchEvent(new Event("click"));
@@ -945,8 +923,6 @@ describe("form", () => {
945
923
  '<form name="otherForm"></form>',
946
924
  )(scope);
947
925
 
948
- scope.$digest();
949
-
950
926
  const form = scope.myForm;
951
927
  const { otherForm } = scope;
952
928
  const { childForm } = form;
@@ -960,15 +936,11 @@ describe("form", () => {
960
936
 
961
937
  // rename the childForm
962
938
  scope.formName = "childFormMoved";
963
- scope.$digest();
964
-
965
939
  expect(form.childFormMoved).toBeUndefined();
966
940
  expect(otherForm.childForm).toBeUndefined();
967
941
  expect(otherForm.childFormMoved).toBe(childForm);
968
942
 
969
943
  scope.hasChildForm = false;
970
- scope.$digest();
971
-
972
944
  expect(form.childFormMoved).toBeUndefined();
973
945
  expect(otherForm.childFormMoved).toBeUndefined();
974
946
  });
@@ -1013,28 +985,23 @@ describe("form", () => {
1013
985
  '<input ng-model="name" name="name" store-model-ctrl/>' +
1014
986
  "</form>",
1015
987
  )(scope);
1016
-
1017
- scope.$digest();
1018
988
  });
1019
989
 
1020
990
  it("should have ng-valid/ng-invalid css class", () => {
1021
991
  expect(doc[0].classList.contains("ng-valid")).toBeTrue();
1022
992
 
1023
993
  control.$setValidity("error", false);
1024
- scope.$digest();
1025
994
  expect(doc[0].classList.contains("ng-invalid")).toBeTrue();
1026
995
  expect(doc[0].classList.contains("ng-valid-error")).toBe(false);
1027
996
  expect(doc[0].classList.contains("ng-invalid-error")).toBe(true);
1028
997
 
1029
998
  control.$setValidity("another", false);
1030
- scope.$digest();
1031
999
  expect(doc[0].classList.contains("ng-valid-error")).toBe(false);
1032
1000
  expect(doc[0].classList.contains("ng-invalid-error")).toBe(true);
1033
1001
  expect(doc[0].classList.contains("ng-valid-another")).toBe(false);
1034
1002
  expect(doc[0].classList.contains("ng-invalid-another")).toBe(true);
1035
1003
 
1036
1004
  control.$setValidity("error", true);
1037
- scope.$digest();
1038
1005
  expect(doc[0].classList.contains("ng-invalid")).toBeTrue();
1039
1006
  expect(doc[0].classList.contains("ng-valid-error")).toBe(true);
1040
1007
  expect(doc[0].classList.contains("ng-invalid-error")).toBe(false);
@@ -1042,7 +1009,6 @@ describe("form", () => {
1042
1009
  expect(doc[0].classList.contains("ng-invalid-another")).toBe(true);
1043
1010
 
1044
1011
  control.$setValidity("another", true);
1045
- scope.$digest();
1046
1012
  expect(doc[0].classList.contains("ng-valid")).toBeTrue();
1047
1013
  expect(doc[0].classList.contains("ng-valid-error")).toBe(true);
1048
1014
  expect(doc[0].classList.contains("ng-invalid-error")).toBe(false);
@@ -1052,7 +1018,6 @@ describe("form", () => {
1052
1018
  // validators are skipped, e.g. because of a parser error
1053
1019
  control.$setValidity("error", null);
1054
1020
  control.$setValidity("another", null);
1055
- scope.$digest();
1056
1021
  expect(doc[0].classList.contains("ng-valid-error")).toBe(false);
1057
1022
  expect(doc[0].classList.contains("ng-invalid-error")).toBe(false);
1058
1023
  expect(doc[0].classList.contains("ng-valid-another")).toBe(false);
@@ -1073,7 +1038,6 @@ describe("form", () => {
1073
1038
  describe("$pending", () => {
1074
1039
  beforeEach(() => {
1075
1040
  doc = $compile('<form name="form"></form>')(scope);
1076
- scope.$digest();
1077
1041
  });
1078
1042
 
1079
1043
  it("should set valid and invalid to undefined when a validation error state is set as pending", () => {
@@ -1110,8 +1074,6 @@ describe("form", () => {
1110
1074
  "</form>",
1111
1075
  )(scope);
1112
1076
 
1113
- scope.$digest();
1114
-
1115
1077
  const form = doc;
1116
1078
  const formCtrl = scope.testForm;
1117
1079
  const input1 = form.find("input").eq(0);
@@ -1127,8 +1089,6 @@ describe("form", () => {
1127
1089
  expect(input2[0].classList.contains("ng-dirty")).toBeTrue();
1128
1090
 
1129
1091
  formCtrl.$setPristine();
1130
- scope.$digest();
1131
-
1132
1092
  expect(form[0].classList.contains("ng-pristine")).toBeTrue();
1133
1093
  expect(form[0].classList.contains("ng-dirty")).toBeFalse();
1134
1094
  expect(formCtrl.$pristine).toBe(true);
@@ -1147,8 +1107,6 @@ describe("form", () => {
1147
1107
  '<form name="testForm">' + '<input ng-model="anonymous">' + "</form>",
1148
1108
  )(scope);
1149
1109
 
1150
- scope.$digest();
1151
-
1152
1110
  const form = doc;
1153
1111
  const formCtrl = scope.testForm;
1154
1112
  const input = form.find("input").eq(0);
@@ -1160,7 +1118,6 @@ describe("form", () => {
1160
1118
  expect(input[0].classList.contains("ng-dirty")).toBeTrue();
1161
1119
 
1162
1120
  formCtrl.$setPristine();
1163
- scope.$digest();
1164
1121
  expect(form[0].classList.contains("ng-pristine")).toBeTrue();
1165
1122
  expect(formCtrl.$pristine).toBe(true);
1166
1123
  expect(formCtrl.$dirty).toBe(false);
@@ -1178,8 +1135,6 @@ describe("form", () => {
1178
1135
  "</form>",
1179
1136
  )(scope);
1180
1137
 
1181
- scope.$digest();
1182
-
1183
1138
  const form = doc;
1184
1139
  const formCtrl = scope.testForm;
1185
1140
  const nestedForm = form.find("div");
@@ -1194,10 +1149,7 @@ describe("form", () => {
1194
1149
  expect(nestedInput[0].classList.contains("ng-dirty")).toBeTrue();
1195
1150
 
1196
1151
  formCtrl.$setPristine();
1197
- scope.$digest();
1198
1152
  expect(form[0].classList.contains("ng-pristine")).toBeTrue();
1199
- scope.$digest();
1200
-
1201
1153
  expect(formCtrl.$pristine).toBe(true);
1202
1154
  expect(formCtrl.$dirty).toBe(false);
1203
1155
  expect(nestedForm[0].classList.contains("ng-pristine")).toBeTrue();
@@ -1216,8 +1168,6 @@ describe("form", () => {
1216
1168
  '<input name="alias" type="text" ng-model="name" />' +
1217
1169
  "</form>",
1218
1170
  )(scope);
1219
- scope.$digest();
1220
-
1221
1171
  scope.myForm.alias.$setTouched();
1222
1172
  expect(scope.myForm.alias.$touched).toBe(true);
1223
1173
  scope.myForm.$setUntouched();
@@ -1233,8 +1183,6 @@ describe("form", () => {
1233
1183
  "</div>" +
1234
1184
  "</form>",
1235
1185
  )(scope);
1236
- scope.$digest();
1237
-
1238
1186
  scope.myForm.childForm.alias.$setTouched();
1239
1187
  expect(scope.myForm.childForm.alias.$touched).toBe(true);
1240
1188
  scope.myForm.$setUntouched();
@@ -1247,8 +1195,6 @@ describe("form", () => {
1247
1195
  it("should return an empty array if the controller has no controls", () => {
1248
1196
  doc = $compile('<form name="testForm"></form>')(scope);
1249
1197
 
1250
- scope.$digest();
1251
-
1252
1198
  const formCtrl = scope.testForm;
1253
1199
 
1254
1200
  expect(formCtrl.$getControls()).toEqual([]);
@@ -1264,8 +1210,6 @@ describe("form", () => {
1264
1210
  "</form>",
1265
1211
  )(scope);
1266
1212
 
1267
- scope.$digest();
1268
-
1269
1213
  const form = doc;
1270
1214
  const formCtrl = scope.testForm;
1271
1215
  const formInput = form.children("input").eq(0);
@@ -1304,7 +1248,6 @@ describe("form", () => {
1304
1248
  "</form>",
1305
1249
  )(scope);
1306
1250
 
1307
- scope.$digest();
1308
1251
  const formA = scope.form.nestedA;
1309
1252
  expect(formA).toBeDefined();
1310
1253
  expect(formA.$name).toBe("nestedA");
@@ -1315,8 +1258,6 @@ describe("form", () => {
1315
1258
 
1316
1259
  scope.idA = "B";
1317
1260
  scope.idB = "Y";
1318
- scope.$digest();
1319
-
1320
1261
  expect(scope.form.nestedA).toBeUndefined();
1321
1262
  expect(scope.form.nestedB).toBe(formA);
1322
1263
  expect(formA.nestedX).toBeUndefined();
@@ -1327,7 +1268,6 @@ describe("form", () => {
1327
1268
  const element = $compile('<form name="name{{nameID}}"></form>')(scope);
1328
1269
  const element2 = $compile('<div ng-form="ngform{{nameID}}"></div>')(scope);
1329
1270
  scope.nameID = "A";
1330
- scope.$digest();
1331
1271
  const form = element.controller("form");
1332
1272
  const form2 = element2.controller("form");
1333
1273
  expect(scope.nameA).toBe(form);
@@ -1336,7 +1276,6 @@ describe("form", () => {
1336
1276
  expect(form2.$name).toBe("ngformA");
1337
1277
 
1338
1278
  scope.nameID = "B";
1339
- scope.$digest();
1340
1279
  expect(scope.nameA).toBeUndefined();
1341
1280
  expect(scope.ngformA).toBeUndefined();
1342
1281
  expect(scope.nameB).toBe(form);
@@ -1347,12 +1286,10 @@ describe("form", () => {
1347
1286
 
1348
1287
  it("should rename forms with an initially blank name", () => {
1349
1288
  const element = $compile('<form name="{{name}}"></form>')(scope);
1350
- scope.$digest();
1351
1289
  const form = element.controller("form");
1352
1290
  expect(scope[""]).toBe(form);
1353
1291
  expect(form.$name).toBe("");
1354
1292
  scope.name = "foo";
1355
- scope.$digest();
1356
1293
  expect(scope.foo).toBe(form);
1357
1294
  expect(form.$name).toBe("foo");
1358
1295
  expect(scope.foo).toBe(form);
@@ -1366,8 +1303,6 @@ describe("form", () => {
1366
1303
  '<input type="submit" />' +
1367
1304
  "</form>",
1368
1305
  )(scope);
1369
-
1370
- scope.$digest();
1371
1306
  });
1372
1307
 
1373
1308
  it("should not init in submitted state", () => {
@@ -1,7 +1,6 @@
1
1
  import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
2
- import { forEach, valueFn } from "../../shared/utils";
2
+ import { valueFn } from "../../shared/utils";
3
3
  import { Angular } from "../../loader";
4
- import { createInjector } from "../../core/di/injector";
5
4
  import { wait } from "../../shared/test-utils";
6
5
 
7
6
  describe("ngIf", () => {
@@ -37,7 +36,7 @@ describe("ngIf", () => {
37
36
  });
38
37
 
39
38
  function makeIf() {
40
- forEach(arguments, (expr) => {
39
+ Array.from(arguments).forEach((expr) => {
41
40
  element.append(
42
41
  $compile(`<div class="my-class" ng-if="${expr}"><div>Hi</div></div>`)(
43
42
  $scope,
@@ -147,8 +146,6 @@ describe("ngIf", () => {
147
146
  });
148
147
  injector = angular.bootstrap(element, ["myModule"]);
149
148
 
150
- $rootScope.$digest();
151
-
152
149
  setTimeout(() => {
153
150
  expect(element.text()).toBe("Hello");
154
151
  done();
@@ -213,7 +210,6 @@ describe("ngIf", () => {
213
210
 
214
211
  it("should not trigger a digest when the element is removed", () => {
215
212
  const spy = spyOn($rootScope, "$digest").and.callThrough();
216
- let $timeout = injector.get("$timeout");
217
213
  $scope.hello = true;
218
214
  makeIf("hello");
219
215
  expect(element.children().length).toBe(1);
@@ -269,7 +265,6 @@ describe("ngIf", () => {
269
265
  const element = $compile('<iso><span ng-bind="val"></span></iso>')(
270
266
  $rootScope,
271
267
  );
272
- $rootScope.$digest();
273
268
  expect(element.text().trim()).toEqual(
274
269
  "val=value in iso scope-transcluded content",
275
270
  );
@@ -87,7 +87,7 @@ test.describe("animations", () => {
87
87
  await expect(animated).toHaveClass(/ng-enter-active/);
88
88
 
89
89
  // Wait for the transition to complete
90
- await page.waitForTimeout(500);
90
+ await page.waitForTimeout(100);
91
91
  await expect(animated).not.toHaveClass(/ng-enter/);
92
92
  await expect(animated).not.toHaveClass(/ng-enter-active/);
93
93
 
@@ -106,7 +106,6 @@ test.describe("animations", () => {
106
106
  await page.goto("src/directive/if/if-animate-css.html");
107
107
  await page.content();
108
108
  await page.click('button:has-text("Fade In!")');
109
- await page.waitForTimeout(600);
110
109
  let animated = await page.locator("#circle");
111
110
  await expect(animated).not.toHaveClass(/ng-enter/);
112
111
  await expect(animated).not.toHaveClass(/ng-enter-active/);
@@ -15,7 +15,7 @@ export const ngIncludeDirective = [
15
15
  * @returns
16
16
  */
17
17
  ($templateRequest, $anchorScroll, $animate) => ({
18
- restrict: "ECA",
18
+ restrict: "EA",
19
19
  priority: 400,
20
20
  terminal: true,
21
21
  transclude: "element",
@@ -129,7 +129,7 @@ export const ngIncludeDirective = [
129
129
  export const ngIncludeFillContentDirective = [
130
130
  "$compile",
131
131
  ($compile) => ({
132
- restrict: "ECA",
132
+ restrict: "EA",
133
133
  priority: -400,
134
134
  require: "ngInclude",
135
135
  link(scope, $element, _$attr, ctrl) {