@angular-wave/angular.ts 0.6.4 → 0.6.6

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 (50) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -2
  3. package/package.json +2 -1
  4. package/src/animations/animate-js.js +1 -1
  5. package/src/animations/animation.js +1 -1
  6. package/src/core/compile/attributes.js +21 -4
  7. package/src/core/compile/compile.js +66 -109
  8. package/src/core/compile/compile.spec.js +14 -13
  9. package/src/core/controller/controller.js +1 -1
  10. package/src/core/di/internal-injector.js +1 -1
  11. package/src/core/exception-handler.js +14 -12
  12. package/src/core/filter/filter.js +1 -1
  13. package/src/core/q/q.js +1 -1
  14. package/src/core/sce/sce.js +1 -1
  15. package/src/core/scope/scope.js +2 -2
  16. package/src/core/timeout/timeout.js +1 -1
  17. package/src/directive/bind/{bing-html.spec.js → bind-html.spec.js} +0 -1
  18. package/src/directive/bind/bind.html +1 -0
  19. package/src/directive/channel/channel.js +25 -7
  20. package/src/directive/channel/channel.spec.js +17 -0
  21. package/src/directive/events/events.js +1 -1
  22. package/src/directive/model/model.js +1 -1
  23. package/src/directive/options/options.spec.js +60 -54
  24. package/src/directive/setter/setter.js +18 -3
  25. package/src/directive/setter/setter.spec.js +29 -8
  26. package/src/loader.js +4 -13
  27. package/src/router/common/coreservices.js +1 -1
  28. package/src/router/state/state-registry.js +1 -1
  29. package/src/router/template-factory.js +8 -7
  30. package/src/router/url/url-matcher.js +1 -1
  31. package/src/services/http/http.js +1 -1
  32. package/src/services/template-request.js +1 -1
  33. package/types/animations/animate-js.d.ts +1 -1
  34. package/types/animations/animation.d.ts +1 -1
  35. package/types/core/compile/compile.d.ts +2 -1
  36. package/types/core/controller/controller.d.ts +1 -1
  37. package/types/core/filter/filter.d.ts +1 -1
  38. package/types/core/q/q.d.ts +1 -1
  39. package/types/core/sce/sce.d.ts +1 -1
  40. package/types/core/scope/scope.d.ts +1 -1
  41. package/types/core/timeout/timeout.d.ts +1 -1
  42. package/types/directive/channel/channel.d.ts +13 -4
  43. package/types/directive/model/model.d.ts +8 -8
  44. package/types/directive/repeat/repeat.d.ts +10 -7
  45. package/types/loader.d.ts +4 -7
  46. package/types/router/common/coreservices.d.ts +1 -1
  47. package/types/router/state/state-registry.d.ts +2 -2
  48. package/types/router/template-factory.d.ts +2 -2
  49. package/types/services/http/http.d.ts +1 -1
  50. package/types/services/template-request.d.ts +1 -1
package/package.json CHANGED
@@ -2,9 +2,10 @@
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "description": "A modern, optimized and typesafe version of AngularJS",
4
4
  "license": "MIT",
5
- "version": "0.6.4",
5
+ "version": "0.6.6",
6
6
  "type": "module",
7
7
  "main": "dist/angular-ts.esm.js",
8
+ "types": "types/index.d.ts",
8
9
  "browser": "dist/angular-ts.umd.js",
9
10
  "repository": {
10
11
  "type": "git",
@@ -15,7 +15,7 @@ export function AnimateJsProvider($animateProvider) {
15
15
  "$$AnimateRunner",
16
16
  /**
17
17
  *
18
- * @param {import("../core/di/internal-injector").InjectorService} $injector
18
+ * @param {import("../core/di/internal-injector.js").InjectorService} $injector
19
19
  * @param {*} $$AnimateRunner
20
20
  * @returns
21
21
  */
@@ -38,7 +38,7 @@ export function AnimationProvider() {
38
38
  /**
39
39
  *
40
40
  * @param {*} $rootScope
41
- * @param {import("../core/di/internal-injector").InjectorService} $injector
41
+ * @param {import("../core/di/internal-injector.js").InjectorService} $injector
42
42
  * @param {*} $$AnimateRunner
43
43
  * @param {import("./raf-scheduler").RafScheduler} $$rAFScheduler
44
44
  * @param {*} $$animateCache
@@ -7,6 +7,7 @@ import {
7
7
  minErr,
8
8
  trim,
9
9
  directiveNormalize,
10
+ hasAnimate,
10
11
  } from "../../shared/utils.js";
11
12
  import { ALIASED_ATTR } from "../../shared/constants.js";
12
13
 
@@ -75,7 +76,11 @@ export class Attributes {
75
76
  */
76
77
  $addClass(classVal) {
77
78
  if (classVal && classVal.length > 0) {
78
- this.$animate.addClass(this.$$element, classVal);
79
+ if (hasAnimate(this.$$element[0])) {
80
+ this.$animate.addClass(this.$$element, classVal);
81
+ } else {
82
+ this.$$element[0].classList.add(classVal.trim());
83
+ }
79
84
  }
80
85
  }
81
86
 
@@ -87,7 +92,11 @@ export class Attributes {
87
92
  */
88
93
  $removeClass(classVal) {
89
94
  if (classVal && classVal.length > 0) {
90
- this.$animate.removeClass(this.$$element, classVal);
95
+ if (hasAnimate(this.$$element[0])) {
96
+ this.$animate.removeClass(this.$$element, classVal);
97
+ } else {
98
+ this.$$element[0].classList.remove(classVal.trim());
99
+ }
91
100
  }
92
101
  }
93
102
 
@@ -101,12 +110,20 @@ export class Attributes {
101
110
  $updateClass(newClasses, oldClasses) {
102
111
  const toAdd = tokenDifference(newClasses, oldClasses);
103
112
  if (toAdd && toAdd.length) {
104
- this.$animate.addClass(this.$$element, toAdd);
113
+ if (hasAnimate(this.$$element[0])) {
114
+ this.$animate.addClass(this.$$element, toAdd);
115
+ } else {
116
+ this.$$element[0].classList.add(...toAdd.trim().split(/\s+/));
117
+ }
105
118
  }
106
119
 
107
120
  const toRemove = tokenDifference(oldClasses, newClasses);
108
121
  if (toRemove && toRemove.length) {
109
- this.$animate.removeClass(this.$$element, toRemove);
122
+ if (hasAnimate(this.$$element[0])) {
123
+ this.$animate.removeClass(this.$$element, toRemove);
124
+ } else {
125
+ this.$$element[0].classList.remove(...toRemove.trim().split(/\s+/));
126
+ }
110
127
  }
111
128
  }
112
129
 
@@ -50,11 +50,10 @@ const $compileMinErr = minErr("$compile");
50
50
 
51
51
  const UNINITALIZED_VALIED = new Object();
52
52
  const EXCLUDED_DIRECTIVES = ["ngIf", "ngRepeat"];
53
-
53
+ export const DIRECTIVE_SUFFIX = "Directive";
54
54
  CompileProvider.$inject = ["$provide", "$$sanitizeUriProvider"];
55
55
  export function CompileProvider($provide, $$sanitizeUriProvider) {
56
56
  const hasDirectives = {};
57
- const Suffix = "Directive";
58
57
  const ALL_OR_NOTHING_ATTRS = {
59
58
  ngSrc: true,
60
59
  ngSrcset: true,
@@ -196,14 +195,14 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
196
195
  assertArg(directiveFactory, "directiveFactory");
197
196
  if (!Object.prototype.hasOwnProperty.call(hasDirectives, name)) {
198
197
  hasDirectives[name] = [];
199
- $provide.factory(name + Suffix, [
198
+ $provide.factory(name + DIRECTIVE_SUFFIX, [
200
199
  "$injector",
201
200
  "$exceptionHandler",
202
201
  /**
203
202
  *
204
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
205
- * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
206
- * @returns
203
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
204
+ * @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
205
+ * @returns {import("../../types.js").Directive[]}
207
206
  */
208
207
  function ($injector, $exceptionHandler) {
209
208
  const directives = [];
@@ -524,7 +523,7 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
524
523
  "$sce",
525
524
  "$animate",
526
525
  /**
527
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
526
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
528
527
  * @param {*} $interpolate
529
528
  * @param {import("../exception-handler").ErrorHandler} $exceptionHandler
530
529
  * @param {*} $templateRequest
@@ -723,7 +722,7 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
723
722
  * Compile function matches each node in nodeList against the directives. Once all directives
724
723
  * for a particular node are collected their compile functions are executed. The compile
725
724
  * functions return values - the linking functions - are combined into a composite linking
726
- * function, which is the a linking function for the node.
725
+ * function, which is the linking function for the node.
727
726
  *
728
727
  * @param {NodeList|JQLite} nodeList an array of nodes or NodeList to compile
729
728
  * @param {*} transcludeFn A linking function, where the
@@ -745,27 +744,29 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
745
744
  previousCompileContext,
746
745
  ) {
747
746
  const linkFns = [];
748
- let attrs;
749
- let directives;
750
747
  /**
751
748
  * @type {any}
752
749
  */
753
- var nodeLinkFn;
750
+ var nodeLinkFn = null;
754
751
  let childNodes;
755
752
  let childLinkFn;
756
753
  let linkFnFound;
757
754
  let nodeLinkFnFound;
758
755
 
759
756
  for (let i = 0; i < nodeList.length; i++) {
760
- attrs = new Attributes($rootScope, $animate, $exceptionHandler, $sce);
757
+ const attrs = new Attributes(
758
+ $rootScope,
759
+ $animate,
760
+ $exceptionHandler,
761
+ $sce,
762
+ );
761
763
 
762
764
  // We must always refer to `nodeList[i]` hereafter,
763
765
  // since the nodes can be replaced underneath us.
764
- directives = collectDirectives(
766
+ const directives = collectDirectives(
765
767
  /** @type Element */ (nodeList[i]),
766
- [],
767
768
  attrs,
768
- i === 0 ? maxPriority : undefined,
769
+ maxPriority,
769
770
  ignoreDirective,
770
771
  );
771
772
 
@@ -822,8 +823,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
822
823
  let childLinkFn;
823
824
  let node;
824
825
  let childScope;
825
- let i;
826
- let ii;
827
826
  let idx;
828
827
  let childBoundTranscludeFn;
829
828
  let stableNodeList;
@@ -834,7 +833,7 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
834
833
  stableNodeList = new Array(nodeList.length);
835
834
 
836
835
  // create a sparse array by only copying the elements which have a linkFn
837
- for (i = 0; i < linkFns.length; i += 3) {
836
+ for (let i = 0; i < linkFns.length; i += 3) {
838
837
  idx = linkFns[i];
839
838
  stableNodeList[idx] = nodeList[idx];
840
839
  }
@@ -842,7 +841,7 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
842
841
  stableNodeList = nodeList;
843
842
  }
844
843
 
845
- for (i = 0, ii = linkFns.length; i < ii; ) {
844
+ for (let i = 0, ii = linkFns.length; i < ii; ) {
846
845
  node = stableNodeList[linkFns[i++]];
847
846
  nodeLinkFn = linkFns[i++];
848
847
  childLinkFn = linkFns[i++];
@@ -944,15 +943,14 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
944
943
  * the function returns.
945
944
  * @param {Attributes|import("./attributes").AttributeLike} attrs The shared attrs object which is used to populate the normalized attributes.
946
945
  * @param {number=} maxPriority Max directive priority.
947
- * @param {boolean=} ignoreDirective
946
+ * @param {string} [ignoreDirective]
947
+ * @return {import('../../types.js').Directive[]} An array to which the directives are added to. This array is sorted before the function returns.
948
948
  */
949
- function collectDirectives(
950
- node,
951
- directives,
952
- attrs,
953
- maxPriority,
954
- ignoreDirective,
955
- ) {
949
+ function collectDirectives(node, attrs, maxPriority, ignoreDirective) {
950
+ /**
951
+ * @type {import('../../types.js').Directive[]}
952
+ */
953
+ const directives = [];
956
954
  const { nodeType } = node;
957
955
  const attrsMap = attrs.$attr;
958
956
  let nodeName;
@@ -960,42 +958,31 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
960
958
  switch (nodeType) {
961
959
  case Node.ELEMENT_NODE /* Element */:
962
960
  nodeName = node.nodeName.toLowerCase();
963
-
964
- // use the node name: <directive>
965
- addDirective(
966
- directives,
967
- directiveNormalize(nodeName),
968
- "E",
969
- maxPriority,
970
- ignoreDirective,
971
- );
961
+ if (ignoreDirective !== directiveNormalize(nodeName)) {
962
+ // use the node name: <directive>
963
+ addDirective(
964
+ directives,
965
+ directiveNormalize(nodeName),
966
+ "E",
967
+ maxPriority,
968
+ );
969
+ }
972
970
 
973
971
  // iterate over the attributes
974
- for (
975
- var attr,
976
- name,
977
- nName,
978
- value,
979
- ngPrefixMatch,
980
- nAttrs = node.attributes,
981
- j = 0,
982
- jj = nAttrs && nAttrs.length;
983
- j < jj;
984
- j++
985
- ) {
972
+ for (let j = 0; j < node.attributes?.length; j++) {
986
973
  let isNgAttr = false;
987
974
  let isNgProp = false;
988
975
  let isNgEvent = false;
989
976
  let isNgObserve = false;
990
977
 
991
- attr = nAttrs[j];
992
- name = attr.name;
993
- value = attr.value;
994
-
995
- nName = directiveNormalize(name.toLowerCase());
978
+ let attr = node.attributes[j];
979
+ let name = attr.name;
980
+ let value = attr.value;
981
+ let nName = directiveNormalize(name.toLowerCase());
996
982
 
997
983
  // Support ng-attr-*, ng-prop-* and ng-on-*
998
- if ((ngPrefixMatch = nName.match(NG_PREFIX_BINDING))) {
984
+ const ngPrefixMatch = nName.match(NG_PREFIX_BINDING);
985
+ if (ngPrefixMatch) {
999
986
  isNgAttr = ngPrefixMatch[1] === "Attr";
1000
987
  isNgProp = ngPrefixMatch[1] === "Prop";
1001
988
  isNgEvent = ngPrefixMatch[1] === "On";
@@ -1016,10 +1003,19 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1016
1003
  if (isNgProp) {
1017
1004
  addPropertyDirective(node, directives, nName, name);
1018
1005
  } else {
1019
- addEventDirective(directives, nName, name);
1006
+ directives.push(
1007
+ createEventDirective(
1008
+ $parse,
1009
+ $rootScope,
1010
+ $exceptionHandler,
1011
+ nName,
1012
+ name,
1013
+ /* forceAsync= */ false,
1014
+ ),
1015
+ );
1020
1016
  }
1021
1017
  } else if (isNgObserve) {
1022
- addObserveDirective(directives, name, value);
1018
+ directives.push(ngObserveDirective(name, value));
1023
1019
  } else {
1024
1020
  // Update nName for cases where a prefix was removed
1025
1021
  // NOTE: the .toLowerCase() is unnecessary and causes https://github.com/angular/angular.js/issues/16624 for ng-attr-*
@@ -1043,13 +1039,10 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1043
1039
  nName,
1044
1040
  isNgAttr,
1045
1041
  );
1046
- addDirective(
1047
- directives,
1048
- nName,
1049
- "A",
1050
- maxPriority,
1051
- ignoreDirective,
1052
- );
1042
+
1043
+ if (nName !== ignoreDirective) {
1044
+ addDirective(directives, nName, "A", maxPriority);
1045
+ }
1053
1046
  }
1054
1047
  }
1055
1048
 
@@ -1742,7 +1735,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1742
1735
  // - combine directives as: processed + template + unprocessed
1743
1736
  const templateDirectives = collectDirectives(
1744
1737
  /** @type {Element} */ (compileNode),
1745
- [],
1746
1738
  newTemplateAttrs,
1747
1739
  );
1748
1740
  const unprocessedDirectives = directives.splice(
@@ -2011,33 +2003,21 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2011
2003
  * looks up the directive and decorates it with exception handling and proper parameters. We
2012
2004
  * call this the boundDirective.
2013
2005
  *
2006
+ * @param {import('../../types.js').Directive[]} tDirectives
2014
2007
  * @param {string} name name of the directive to look up.
2015
2008
  * @param {string} location The directive must be found in specific format.
2016
2009
  * String containing any of these characters:
2017
- *
2018
2010
  * * `E`: element name
2019
2011
  * * `A': attribute
2012
+ * @param maxPriority
2020
2013
  * @returns {boolean} true if directive was added.
2021
2014
  */
2022
- function addDirective(
2023
- tDirectives,
2024
- name,
2025
- location,
2026
- maxPriority,
2027
- ignoreDirective,
2028
- ) {
2029
- if (name === ignoreDirective) return false;
2015
+ function addDirective(tDirectives, name, location, maxPriority) {
2030
2016
  let match = false;
2031
2017
  if (Object.prototype.hasOwnProperty.call(hasDirectives, name)) {
2032
- for (
2033
- let directive,
2034
- directives = $injector.get(name + Suffix),
2035
- i = 0,
2036
- ii = directives.length;
2037
- i < ii;
2038
- i++
2039
- ) {
2040
- directive = directives[i];
2018
+ let directives = $injector.get(name + DIRECTIVE_SUFFIX);
2019
+ for (let i = 0, ii = directives.length; i < ii; i++) {
2020
+ let directive = directives[i];
2041
2021
  if (
2042
2022
  (isUndefined(maxPriority) || maxPriority > directive.priority) &&
2043
2023
  directive.restrict.indexOf(location) !== -1
@@ -2168,7 +2148,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2168
2148
  replaceWith($rootElement, $compileNode, compileNode);
2169
2149
  const templateDirectives = collectDirectives(
2170
2150
  compileNode,
2171
- [],
2172
2151
  tempTemplateAttrs,
2173
2152
  );
2174
2153
 
@@ -2331,15 +2310,13 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2331
2310
  }
2332
2311
 
2333
2312
  function addTextInterpolateDirective(directives, text) {
2334
- const interpolateFn = $interpolate(text, true); // Create interpolation function
2313
+ const interpolateFn = $interpolate(text, true);
2335
2314
  if (interpolateFn) {
2336
2315
  directives.push({
2337
2316
  priority: 0,
2338
- // When transcluding a template that has bindings in the root
2339
- // we don't have a parent and thus need to add the class during linking fn.
2340
2317
  compile: () => (scope, node) => {
2341
2318
  scope.$watch(interpolateFn, (value) => {
2342
- node[0].nodeValue = value; // Update text node with new interpolated value
2319
+ node[0].nodeValue = value;
2343
2320
  });
2344
2321
  },
2345
2322
  });
@@ -2411,10 +2388,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2411
2388
  );
2412
2389
  }
2413
2390
 
2414
- function sanitizeSrcsetPropertyValue(value) {
2415
- return sanitizeSrcset($sce.valueOf(value), "ng-prop-srcset");
2416
- }
2417
-
2418
2391
  function sanitizeSrcset(value, invokeType) {
2419
2392
  if (!value) {
2420
2393
  return value;
@@ -2487,7 +2460,8 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2487
2460
  propName === "srcset" &&
2488
2461
  (nodeName === "img" || nodeName === "source")
2489
2462
  ) {
2490
- sanitizer = sanitizeSrcsetPropertyValue;
2463
+ sanitizer = (value) =>
2464
+ sanitizeSrcset($sce.valueOf(value), "ng-prop-srcset");
2491
2465
  } else if (trustedContext) {
2492
2466
  sanitizer = $sce.getTrusted.bind($sce, trustedContext);
2493
2467
  }
@@ -2516,23 +2490,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2516
2490
  });
2517
2491
  }
2518
2492
 
2519
- function addEventDirective(directives, attrName, eventName) {
2520
- directives.push(
2521
- createEventDirective(
2522
- $parse,
2523
- $rootScope,
2524
- $exceptionHandler,
2525
- attrName,
2526
- eventName,
2527
- /* forceAsync= */ false,
2528
- ),
2529
- );
2530
- }
2531
-
2532
- function addObserveDirective(directives, source, prop) {
2533
- directives.push(ngObserveDirective(source, prop));
2534
- }
2535
-
2536
2493
  function addAttrInterpolateDirective(
2537
2494
  node,
2538
2495
  directives,
@@ -3664,7 +3664,8 @@ describe("$compile", () => {
3664
3664
  return {
3665
3665
  transclude: "element",
3666
3666
  link: function (scope, el, attrs, ctrl, transclude) {
3667
- el.after(transclude());
3667
+ const res = transclude();
3668
+ el.after(res);
3668
3669
  },
3669
3670
  };
3670
3671
  },
@@ -13059,7 +13060,7 @@ describe("$compile", () => {
13059
13060
  describe("content transclusion", () => {
13060
13061
  it("should support transclude directive", () => {
13061
13062
  module.directive("trans", () => ({
13062
- transclude: "content",
13063
+ transclude: true,
13063
13064
  replace: true,
13064
13065
  scope: {},
13065
13066
  link(scope) {
@@ -13085,7 +13086,7 @@ describe("$compile", () => {
13085
13086
  .directive(
13086
13087
  "book",
13087
13088
  valueFn({
13088
- transclude: "content",
13089
+ transclude: true,
13089
13090
  template:
13090
13091
  "<div>book-<div chapter>(<div ng-transclude></div>)</div></div>",
13091
13092
  }),
@@ -13093,14 +13094,14 @@ describe("$compile", () => {
13093
13094
  .directive(
13094
13095
  "chapter",
13095
13096
  valueFn({
13096
- transclude: "content",
13097
+ transclude: true,
13097
13098
  templateUrl: "chapter.html",
13098
13099
  }),
13099
13100
  )
13100
13101
  .directive(
13101
13102
  "section",
13102
13103
  valueFn({
13103
- transclude: "content",
13104
+ transclude: true,
13104
13105
  template:
13105
13106
  "<div>section-!<div ng-transclude></div>!</div></div>",
13106
13107
  }),
@@ -13163,7 +13164,7 @@ describe("$compile", () => {
13163
13164
  module.directive(
13164
13165
  "foo",
13165
13166
  valueFn({
13166
- transclude: "content",
13167
+ transclude: true,
13167
13168
  template: "<div>This is before {{before}}. </div>",
13168
13169
  link(scope, element, attr, ctrls, $transclude) {
13169
13170
  const futureParent = element.children().eq(0);
@@ -13232,7 +13233,7 @@ describe("$compile", () => {
13232
13233
  .directive(
13233
13234
  "trans",
13234
13235
  valueFn({
13235
- transclude: "content",
13236
+ transclude: true,
13236
13237
  link(scope, element, attr, ctrl, $transclude) {
13237
13238
  $transclude((clone) => {
13238
13239
  element.append(clone);
@@ -13264,7 +13265,7 @@ describe("$compile", () => {
13264
13265
  .directive(
13265
13266
  "trans",
13266
13267
  valueFn({
13267
- transclude: "content",
13268
+ transclude: true,
13268
13269
  link(scope, element, attr, ctrl, $transclude) {
13269
13270
  $transclude((clone) => {
13270
13271
  element.append(clone);
@@ -13860,7 +13861,7 @@ describe("$compile", () => {
13860
13861
  module.directive(
13861
13862
  "transclude",
13862
13863
  valueFn({
13863
- transclude: "content",
13864
+ transclude: true,
13864
13865
  controller($transclude) {
13865
13866
  transcludeCtrl = this;
13866
13867
  },
@@ -13897,7 +13898,7 @@ describe("$compile", () => {
13897
13898
  module.directive(
13898
13899
  "transclude",
13899
13900
  valueFn({
13900
- transclude: "content",
13901
+ transclude: true,
13901
13902
  controller($transclude) {
13902
13903
  ctrlTransclude = $transclude;
13903
13904
  },
@@ -13925,7 +13926,7 @@ describe("$compile", () => {
13925
13926
  module.directive(
13926
13927
  "transclude",
13927
13928
  valueFn({
13928
- transclude: "content",
13929
+ transclude: true,
13929
13930
  link(scope, element, attr, ctrl, $transclude) {
13930
13931
  $transclude(scope, (clone) => {
13931
13932
  element.append(clone);
@@ -13945,7 +13946,7 @@ describe("$compile", () => {
13945
13946
  .directive(
13946
13947
  "transclude",
13947
13948
  valueFn({
13948
- transclude: "content",
13949
+ transclude: true,
13949
13950
  controller() {},
13950
13951
  link(scope, element, attr, ctrl, $transclude) {
13951
13952
  $transclude((clone) => {
@@ -14764,7 +14765,7 @@ describe("$compile", () => {
14764
14765
  .directive(
14765
14766
  "transclude",
14766
14767
  valueFn({
14767
- transclude: "content",
14768
+ transclude: true,
14768
14769
  controller($transclude) {
14769
14770
  transclude = $transclude;
14770
14771
  },
@@ -66,7 +66,7 @@ export class ControllerProvider {
66
66
  /**
67
67
  * $get method for dependency injection.
68
68
  *
69
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
69
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
70
70
  * @returns {Function} A service function that creates controllers.
71
71
  */
72
72
  $get = [
@@ -1,5 +1,5 @@
1
1
  import { assertArgFn, minErr } from "../../shared/utils.js";
2
- import { INJECTOR_LITERAL } from "./ng-module";
2
+ import { INJECTOR_LITERAL } from "./ng-module.js";
3
3
 
4
4
  const ARROW_ARG = /^([^(]+?)=>/;
5
5
  const FN_ARGS = /^[^(]*\(\s*([^)]*)\)/m;
@@ -48,16 +48,18 @@ export const errorHandler = (exception, cause) => {
48
48
  * @constructor
49
49
  * @this {import('../types').ServiceProvider}
50
50
  */
51
- export function ExceptionHandlerProvider() {
52
- this.$get = [
53
- "$log",
54
- /**
55
- * @param {import('../services/log').LogService} $log
56
- * @returns {ErrorHandler}
57
- */
58
- function ($log) {
59
- log = $log;
60
- return errorHandler;
61
- },
62
- ];
51
+ export class ExceptionHandlerProvider {
52
+ constructor() {
53
+ this.$get = [
54
+ "$log",
55
+ /**
56
+ * @param {import('../services/log').LogService} $log
57
+ * @returns {ErrorHandler}
58
+ */
59
+ function ($log) {
60
+ log = $log;
61
+ return errorHandler;
62
+ },
63
+ ];
64
+ }
63
65
  }
@@ -28,7 +28,7 @@ export function FilterProvider($provide) {
28
28
  "$injector",
29
29
  /**
30
30
  *
31
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
31
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
32
32
  * @returns
33
33
  */
34
34
  function ($injector) {
package/src/core/q/q.js CHANGED
@@ -65,7 +65,7 @@ export class $QProvider {
65
65
  /**
66
66
  *
67
67
  * @param {import('../scope/scope').Scope} $rootScope
68
- * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
68
+ * @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
69
69
  * @returns
70
70
  */
71
71
  function ($rootScope, $exceptionHandler) {
@@ -230,7 +230,7 @@ export function SceDelegateProvider() {
230
230
  "$$sanitizeUri",
231
231
  /**
232
232
  *
233
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
233
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
234
234
  * @param {*} $$sanitizeUri
235
235
  * @returns
236
236
  */
@@ -72,7 +72,7 @@ let applyAsyncId = null;
72
72
  let $parse;
73
73
  /** @type {import('../../services/browser').Browser} */
74
74
  let $browser;
75
- /**@type {import('../exception-handler').ErrorHandler} */
75
+ /**@type {import("../exception-handler.js").ErrorHandler} */
76
76
  let $exceptionHandler;
77
77
 
78
78
  /**
@@ -96,7 +96,7 @@ export class RootScopeProvider {
96
96
  "$parse",
97
97
  "$browser",
98
98
  /**
99
- * @param {import('../exception-handler').ErrorHandler} exceptionHandler
99
+ * @param {import("../exception-handler.js").ErrorHandler} exceptionHandler
100
100
  * @param {import('../parse/parse').ParseService} parse
101
101
  * @param {import('../../services/browser').Browser} browser
102
102
  * @returns {Scope} root scope
@@ -14,7 +14,7 @@ export class TimeoutProvider {
14
14
  * @param {import('../scope/scope').Scope} $rootScope
15
15
  * @param {import('../../services/browser').Browser} $browser
16
16
  * @param {*} $q
17
- * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
17
+ * @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
18
18
  * @returns
19
19
  */
20
20
  ($rootScope, $browser, $q, $exceptionHandler) => {
@@ -1,5 +1,4 @@
1
1
  import { createInjector } from "../../core/di/injector";
2
- import { forEach } from "../../shared/utils.js";
3
2
  import { Angular } from "../../loader";
4
3
 
5
4
  describe("ngBindHtml", () => {