@angular-wave/angular.ts 0.10.0 → 0.11.0

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.
@@ -1,4 +1,4 @@
1
- /* Version: 0.10.0 - November 8, 2025 10:37:14 */
1
+ /* Version: 0.11.0 - November 11, 2025 21:55:57 */
2
2
  const VALID_CLASS = "ng-valid";
3
3
  const INVALID_CLASS = "ng-invalid";
4
4
  const PRISTINE_CLASS = "ng-pristine";
@@ -1897,7 +1897,7 @@ function setIsolateScope(element, scope) {
1897
1897
  * Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
1898
1898
  *
1899
1899
  * @param {Element} element - The DOM element to get data from.
1900
- * @param {string} [name] - The DOM element to get data from.
1900
+ * @param {string} [name] - Controller name.
1901
1901
  * @returns {import("../core/scope/scope.js").Scope|undefined} - The retrieved data
1902
1902
  */
1903
1903
  function getController(element, name) {
@@ -2047,7 +2047,7 @@ function cleanElementData(nodes) {
2047
2047
  /**
2048
2048
  * Return instance of InjectorService attached to element
2049
2049
  * @param {Element} element
2050
- * @returns {import('../core/di/internal-injector.js').InjectorService}
2050
+ * @returns {ng.InjectorService}
2051
2051
  */
2052
2052
  function getInjector(element) {
2053
2053
  return getInheritedData(element, "$injector");
@@ -2107,6 +2107,26 @@ function domInsert(element, parentElement, afterElement) {
2107
2107
  }
2108
2108
  }
2109
2109
 
2110
+ function animatedomInsert(element, parent, after) {
2111
+ const originalVisibility = element.style.visibility;
2112
+ const originalPosition = element.style.position;
2113
+ const originalPointerEvents = element.style.pointerEvents;
2114
+
2115
+ Object.assign(element.style, {
2116
+ visibility: "hidden",
2117
+ position: "absolute",
2118
+ pointerEvents: "none",
2119
+ });
2120
+
2121
+ domInsert(element, parent, after);
2122
+
2123
+ requestAnimationFrame(() => {
2124
+ element.style.visibility = originalVisibility;
2125
+ element.style.position = originalPosition;
2126
+ element.style.pointerEvents = originalPointerEvents;
2127
+ });
2128
+ }
2129
+
2110
2130
  /**
2111
2131
  * Returns the base href of the document.
2112
2132
  *
@@ -2138,8 +2158,6 @@ const $injectTokens = Object.freeze({
2138
2158
  $attrs: "$attrs",
2139
2159
  $scope: "$scope",
2140
2160
  $element: "$element",
2141
- $$AnimateRunner: "$$AnimateRunner",
2142
- $$animateAsyncRun: "$$animateAsyncRun",
2143
2161
  $$animateCache: "$$animateCache",
2144
2162
  $$animateCssDriver: "$$animateCssDriver",
2145
2163
  $$animateJs: "$$animateJs",
@@ -2642,6 +2660,8 @@ class InjectorService extends AbstractInjector {
2642
2660
  const hasCache = hasOwn(this.cache, name);
2643
2661
  return hasProvider || hasCache;
2644
2662
  }
2663
+
2664
+ loadNewModules() {}
2645
2665
  }
2646
2666
 
2647
2667
  // Helpers
@@ -10868,9 +10888,9 @@ function checkboxInputType(scope, element, attr, ctrl, $filter, $parse) {
10868
10888
  inputDirective.$inject = ["$filter", "$parse"];
10869
10889
 
10870
10890
  /**
10871
- * @param {*} $filter
10872
- * @param {*} $parse
10873
- * @returns {import('../../interface.ts').Directive}
10891
+ * @param {ng.FilterService} $filter
10892
+ * @param {ng.ParseService} $parse
10893
+ * @returns {ng.Directive}
10874
10894
  */
10875
10895
  function inputDirective($filter, $parse) {
10876
10896
  return {
@@ -10894,7 +10914,7 @@ function inputDirective($filter, $parse) {
10894
10914
  }
10895
10915
 
10896
10916
  /**
10897
- * @returns {import('../../interface.ts').Directive}
10917
+ * @returns {ng.Directive}
10898
10918
  */
10899
10919
  function hiddenInputBrowserCacheDirective() {
10900
10920
  const valueProperty = {
@@ -10940,7 +10960,7 @@ function hiddenInputBrowserCacheDirective() {
10940
10960
  const CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
10941
10961
 
10942
10962
  /**
10943
- * @returns {import('../../interface.ts').Directive}
10963
+ * @returns {ng.Directive}
10944
10964
  */
10945
10965
  function ngValueDirective() {
10946
10966
  /**
@@ -10964,15 +10984,15 @@ function ngValueDirective() {
10964
10984
  return {
10965
10985
  restrict: "A",
10966
10986
  priority: 100,
10967
- compile(tpl, tplAttr) {
10968
- if (CONSTANT_VALUE_REGEXP.test(tplAttr["ngValue"])) {
10969
- return function ngValueConstantLink(scope, elm, attr) {
10970
- const value = scope.$eval(attr["ngValue"]);
10987
+ compile(_, tplAttr) {
10988
+ if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {
10989
+ return function (scope, elm, attr) {
10990
+ const value = scope.$eval(attr.ngValue);
10971
10991
  updateElementValue(elm, attr, value);
10972
10992
  };
10973
10993
  }
10974
- return function ngValueLink(scope, elm, attr) {
10975
- scope.$watch(attr["ngValue"], (value) => {
10994
+ return function (scope, elm, attr) {
10995
+ scope.$watch(attr.ngValue, (value) => {
10976
10996
  updateElementValue(elm, attr, value);
10977
10997
  });
10978
10998
  };
@@ -11653,17 +11673,20 @@ function ngBindHtmlDirective($parse) {
11653
11673
  /**
11654
11674
  * @param {string} name
11655
11675
  * @param {boolean|number} selector
11656
- * @returns {() => import("../../interface.ts").Directive}
11676
+ * @returns {ng.DirectiveFactory}
11657
11677
  */
11658
11678
  function classDirective(name, selector) {
11659
11679
  name = `ngClass${name}`;
11660
11680
 
11681
+ /**
11682
+ * @returns {ng.Directive}
11683
+ */
11661
11684
  return function () {
11662
11685
  return {
11663
11686
  /**
11664
- * @param {import("../../core/scope/scope.js").Scope} scope
11665
- * @param {Element} element
11666
- * @param {import("../../core/compile/attributes").Attributes} attr
11687
+ * @param {ng.Scope} scope
11688
+ * @param {HTMLElement} element
11689
+ * @param {ng.Attributes} attr
11667
11690
  */
11668
11691
  link(scope, element, attr) {
11669
11692
  let classCounts = getCacheData(element, "$classCounts");
@@ -11837,9 +11860,8 @@ const ngClassEvenDirective = classDirective("Even", 1);
11837
11860
  */
11838
11861
  function ngCloakDirective() {
11839
11862
  return {
11840
- compile(element, attr) {
11863
+ compile(_, attr) {
11841
11864
  attr.$set("ngCloak", undefined);
11842
- element.classList.remove("ng-cloak");
11843
11865
  },
11844
11866
  };
11845
11867
  }
@@ -11943,7 +11965,7 @@ function ngIfDirective($animate) {
11943
11965
  /** @type {Element} */
11944
11966
  let block;
11945
11967
 
11946
- /** @type {import('../../core/scope/scope.js').Scope} */
11968
+ /** @type {ng.Scope} */
11947
11969
  let childScope;
11948
11970
 
11949
11971
  let previousElements;
@@ -13992,7 +14014,7 @@ function prepareAnimateOptions(options) {
13992
14014
 
13993
14015
  AnimateProvider.$inject = ["$provide"];
13994
14016
 
13995
- /** @param {import('../interface.ts').Provider} $provide */
14017
+ /** @param {ng.ProvideService} $provide */
13996
14018
  function AnimateProvider($provide) {
13997
14019
  const provider = this;
13998
14020
  let classNameFilter = null;
@@ -14267,7 +14289,7 @@ function AnimateProvider($provide) {
14267
14289
  * Note that this does not cancel the underlying operation, e.g. the setting of classes or
14268
14290
  * adding the element to the DOM.
14269
14291
  *
14270
- * @param {import('./animate-runner.js').AnimateRunner} runner An animation runner returned by an $animate function.
14292
+ * @param {import('./runner/animate-runner.js').AnimateRunner} runner An animation runner returned by an $animate function.
14271
14293
  *
14272
14294
  * @example
14273
14295
  <example module="animationExample" deps="angular-animate.js" animations="true" name="animate-cancel">
@@ -14347,11 +14369,11 @@ function AnimateProvider($provide) {
14347
14369
  * @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
14348
14370
  * @param {Element} [after] - after the sibling element after which the element will be appended
14349
14371
  * @param {AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
14350
- * @returns {import('./animate-runner.js').AnimateRunner} the animation runner
14372
+ * @returns {import('./runner/animate-runner.js').AnimateRunner} the animation runner
14351
14373
  */
14352
14374
  enter(element, parent, after, options) {
14353
14375
  parent = parent || after.parentElement;
14354
- domInsert(element, parent, after);
14376
+ animatedomInsert(element, parent, after);
14355
14377
  return $$animateQueue.push(
14356
14378
  element,
14357
14379
  "enter",
@@ -14369,11 +14391,11 @@ function AnimateProvider($provide) {
14369
14391
  * @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
14370
14392
  * @param {Element} after - after the sibling element after which the element will be appended
14371
14393
  * @param {AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
14372
- * @returns {import('./animate-runner.js').AnimateRunner} the animation runner
14394
+ * @returns {import('./runner/animate-runner.js').AnimateRunner} the animation runner
14373
14395
  */
14374
14396
  move(element, parent, after, options) {
14375
14397
  parent = parent || after.parentElement;
14376
- domInsert(element, parent, after);
14398
+ animatedomInsert(element, parent, after);
14377
14399
  return $$animateQueue.push(
14378
14400
  element,
14379
14401
  "move",
@@ -14388,7 +14410,7 @@ function AnimateProvider($provide) {
14388
14410
  *
14389
14411
  * @param {Element} element the element which will be removed from the DOM
14390
14412
  * @param {AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
14391
- * @returns {import('./animate-runner.js').AnimateRunner} the animation runner
14413
+ * @returns {import('./runner/animate-runner.js').AnimateRunner} the animation runner
14392
14414
  */
14393
14415
  leave(element, options) {
14394
14416
  return $$animateQueue.push(
@@ -14417,7 +14439,7 @@ function AnimateProvider($provide) {
14417
14439
  * @param {Element} element the element which the CSS classes will be applied to
14418
14440
  * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
14419
14441
  * @param {AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
14420
- * @return {import('./animate-runner.js').AnimateRunner}} animationRunner the animation runner
14442
+ * @return {import('./runner/animate-runner.js').AnimateRunner}} animationRunner the animation runner
14421
14443
  */
14422
14444
  addClass(element, className, options) {
14423
14445
  options = prepareAnimateOptions(options);
@@ -14436,7 +14458,7 @@ function AnimateProvider($provide) {
14436
14458
  * @param {Element} element the element which the CSS classes will be applied to
14437
14459
  * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
14438
14460
  * @param {AnimationOptions} [options] an optional collection of options/styles that will be applied to the element. *
14439
- * @return {import('./animate-runner.js').AnimateRunner} animationRunner the animation runner
14461
+ * @return {import('./runner/animate-runner.js').AnimateRunner} animationRunner the animation runner
14440
14462
  */
14441
14463
  removeClass(element, className, options) {
14442
14464
  options = prepareAnimateOptions(options);
@@ -14457,7 +14479,7 @@ function AnimateProvider($provide) {
14457
14479
  * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
14458
14480
  * @param {object=} options an optional collection of options/styles that will be applied to the element.
14459
14481
  *
14460
- * @return {import('./animate-runner.js').AnimateRunner} the animation runner
14482
+ * @return {import('./runner/animate-runner.js').AnimateRunner} the animation runner
14461
14483
  */
14462
14484
  setClass(element, add, remove, options) {
14463
14485
  options = prepareAnimateOptions(options);
@@ -14485,7 +14507,7 @@ function AnimateProvider($provide) {
14485
14507
  * }
14486
14508
  * });
14487
14509
  * ```
14488
- * @return {import('./animate-runner.js').AnimateRunner} the animation runner
14510
+ * @return {import('./runner/animate-runner.js').AnimateRunner} the animation runner
14489
14511
  */
14490
14512
  animate(element, from, to, className, options) {
14491
14513
  options = prepareAnimateOptions(options);
@@ -14501,200 +14523,6 @@ function AnimateProvider($provide) {
14501
14523
  ];
14502
14524
  }
14503
14525
 
14504
- function AnimateAsyncRunFactoryProvider() {
14505
- this.$get = [
14506
- function () {
14507
- let waitQueue = [];
14508
-
14509
- function waitForTick(fn) {
14510
- waitQueue.push(fn);
14511
- if (waitQueue.length > 1) return;
14512
- window.requestAnimationFrame(function () {
14513
- for (let i = 0; i < waitQueue.length; i++) {
14514
- waitQueue[i]();
14515
- }
14516
- waitQueue = [];
14517
- });
14518
- }
14519
-
14520
- return function () {
14521
- let passed = false;
14522
- waitForTick(function () {
14523
- passed = true;
14524
- });
14525
- return function (callback) {
14526
- if (passed) {
14527
- callback();
14528
- } else {
14529
- waitForTick(callback);
14530
- }
14531
- };
14532
- };
14533
- },
14534
- ];
14535
- }
14536
-
14537
- const INITIAL_STATE = 0;
14538
- const DONE_PENDING_STATE = 1;
14539
- const DONE_COMPLETE_STATE = 2;
14540
- let $$animateAsyncRun;
14541
-
14542
- function AnimateRunnerFactoryProvider() {
14543
- this.$get = [
14544
- "$$animateAsyncRun",
14545
- function (animateAsyncRun) {
14546
- $$animateAsyncRun = animateAsyncRun;
14547
- return AnimateRunner;
14548
- },
14549
- ];
14550
- }
14551
-
14552
- class AnimateRunner {
14553
- static chain(chain, callback) {
14554
- let index = 0;
14555
-
14556
- function next() {
14557
- if (index === chain.length) {
14558
- callback(true);
14559
- return;
14560
- }
14561
-
14562
- chain[index]((response) => {
14563
- if (response === false) {
14564
- callback(false);
14565
- return;
14566
- }
14567
- index++;
14568
- next();
14569
- });
14570
- }
14571
-
14572
- next();
14573
- }
14574
-
14575
- static all(runners, callback) {
14576
- let count = 0;
14577
- let status = true;
14578
-
14579
- runners.forEach((runner) => {
14580
- runner.done(onProgress);
14581
- });
14582
-
14583
- function onProgress(response) {
14584
- status = status && response;
14585
- if (++count === runners.length) {
14586
- callback(status);
14587
- }
14588
- }
14589
- }
14590
-
14591
- constructor(host) {
14592
- this.setHost(host);
14593
-
14594
- const rafTick = $$animateAsyncRun();
14595
- const timeoutTick = (fn) => {
14596
- setTimeout(fn, 0, false);
14597
- };
14598
-
14599
- this._doneCallbacks = [];
14600
- this._tick = (fn) => {
14601
- if (document.hidden) {
14602
- timeoutTick(fn);
14603
- } else {
14604
- rafTick(fn);
14605
- }
14606
- };
14607
- this._state = 0;
14608
- }
14609
-
14610
- setHost(host) {
14611
- this.host = host || {};
14612
- }
14613
-
14614
- done(fn) {
14615
- if (this._state === DONE_COMPLETE_STATE) {
14616
- fn();
14617
- } else {
14618
- this._doneCallbacks.push(fn);
14619
- }
14620
- }
14621
-
14622
- progress() {}
14623
-
14624
- getPromise() {
14625
- if (!this.promise) {
14626
- const self = this;
14627
- this.promise = new Promise((resolve, reject) => {
14628
- self.done((status) => {
14629
- if (status === false) {
14630
- reject();
14631
- } else {
14632
- resolve();
14633
- }
14634
- });
14635
- });
14636
- }
14637
- return this.promise;
14638
- }
14639
-
14640
- then(resolveHandler, rejectHandler) {
14641
- return this.getPromise().then(resolveHandler, rejectHandler);
14642
- }
14643
-
14644
- catch(handler) {
14645
- return this.getPromise().catch(handler);
14646
- }
14647
-
14648
- finally(handler) {
14649
- return this.getPromise().finally(handler);
14650
- }
14651
-
14652
- pause() {
14653
- if (this.host.pause) {
14654
- this.host.pause();
14655
- }
14656
- }
14657
-
14658
- resume() {
14659
- if (this.host.resume) {
14660
- this.host.resume();
14661
- }
14662
- }
14663
-
14664
- end() {
14665
- if (this.host.end) {
14666
- this.host.end();
14667
- }
14668
- this._resolve(true);
14669
- }
14670
-
14671
- cancel() {
14672
- if (this.host.cancel) {
14673
- this.host.cancel();
14674
- }
14675
- this._resolve(false);
14676
- }
14677
-
14678
- complete(response) {
14679
- if (this._state === INITIAL_STATE) {
14680
- this._state = DONE_PENDING_STATE;
14681
- this._tick(() => {
14682
- this._resolve(response);
14683
- });
14684
- }
14685
- }
14686
-
14687
- _resolve(response) {
14688
- if (this._state !== DONE_COMPLETE_STATE) {
14689
- this._doneCallbacks.forEach((fn) => {
14690
- fn(response);
14691
- });
14692
- this._doneCallbacks.length = 0;
14693
- this._state = DONE_COMPLETE_STATE;
14694
- }
14695
- }
14696
- }
14697
-
14698
14526
  /**
14699
14527
  * Provides an instance of a cache that can be used to store and retrieve template content.
14700
14528
  */
@@ -15274,7 +15102,7 @@ class FilterProvider {
15274
15102
  /* @ignore */ static $inject = [$injectTokens.$provide];
15275
15103
 
15276
15104
  /**
15277
- * @param {import('../../interface.ts').Provider} $provide
15105
+ * @param {ng.ProvideService} $provide
15278
15106
  */
15279
15107
  constructor($provide) {
15280
15108
  this.$provide = $provide;
@@ -19519,8 +19347,6 @@ class LocationProvider {
19519
19347
  * @returns {Location}
19520
19348
  */
19521
19349
  ($rootScope, $rootElement) => {
19522
- /** @type {Location} */
19523
- let $location;
19524
19350
  const baseHref = getBaseHref(); // if base[href] is undefined, it defaults to ''
19525
19351
  const initialUrl = trimEmptyHash(window.location.href);
19526
19352
  let appBase;
@@ -19538,7 +19364,7 @@ class LocationProvider {
19538
19364
  }
19539
19365
  const appBaseNoFile = stripFile(appBase);
19540
19366
 
19541
- $location = new Location(
19367
+ const $location = new Location(
19542
19368
  appBase,
19543
19369
  appBaseNoFile,
19544
19370
  this.html5ModeConf.enabled,
@@ -20128,6 +19954,9 @@ function createScope(target = {}, context) {
20128
19954
  }
20129
19955
 
20130
19956
  if (typeof target === "object") {
19957
+ if (isUnsafeGlobal(target)) {
19958
+ return target;
19959
+ }
20131
19960
  const proxy = new Proxy(target, context || new Scope());
20132
19961
  for (const key in target) {
20133
19962
  if (hasOwn(target, key)) {
@@ -20145,7 +19974,7 @@ function createScope(target = {}, context) {
20145
19974
  target[key] = createScope(target[key], proxy.$handler);
20146
19975
  }
20147
19976
  } catch {
20148
- // convert only what we can
19977
+ /* empty */
20149
19978
  }
20150
19979
  }
20151
19980
  }
@@ -20156,6 +19985,45 @@ function createScope(target = {}, context) {
20156
19985
  }
20157
19986
  }
20158
19987
 
19988
+ /**
19989
+ * @param {any} target
19990
+ * @returns {boolean}
19991
+ */
19992
+ function isUnsafeGlobal(target) {
19993
+ if (target == null) return false;
19994
+ const t = typeof target;
19995
+ if (t !== "object" && t !== "function") return false;
19996
+
19997
+ const g = globalThis;
19998
+ if (
19999
+ target === g ||
20000
+ target === g.window ||
20001
+ target === g.document ||
20002
+ target === g.self ||
20003
+ target === g.frames
20004
+ ) {
20005
+ return true;
20006
+ }
20007
+
20008
+ // DOM / browser host object checks
20009
+ if (
20010
+ (typeof Window !== "undefined" && target instanceof Window) ||
20011
+ (typeof Document !== "undefined" && target instanceof Document) ||
20012
+ (typeof Element !== "undefined" && target instanceof Element) ||
20013
+ (typeof Node !== "undefined" && target instanceof Node) ||
20014
+ (typeof EventTarget !== "undefined" && target instanceof EventTarget)
20015
+ ) {
20016
+ return true;
20017
+ }
20018
+
20019
+ // Cross-origin or non-enumerable window objects
20020
+ try {
20021
+ return Object.prototype.toString.call(target) === "[object Window]";
20022
+ } catch {
20023
+ return true;
20024
+ }
20025
+ }
20026
+
20159
20027
  /**
20160
20028
  * Decorator for excluding objects from scope observability
20161
20029
  */
@@ -22229,6 +22097,231 @@ function ngDblclickAriaDirective($aria) {
22229
22097
  };
22230
22098
  }
22231
22099
 
22100
+ /**
22101
+ * @fileoverview
22102
+ * Frame-synchronized animation runner and scheduler.
22103
+ * Provides async batching of animation callbacks using requestAnimationFrame.
22104
+ * In AngularJS, this user to be implemented as `$$AnimateRunner`
22105
+ */
22106
+
22107
+ /**
22108
+ * Internal runner states.
22109
+ * @readonly
22110
+ * @enum {number}
22111
+ */
22112
+ const RunnerState = {
22113
+ INITIAL: 0,
22114
+ PENDING: 1,
22115
+ DONE: 2,
22116
+ };
22117
+
22118
+ /** @type {VoidFunction[]} */
22119
+ let queue = [];
22120
+
22121
+ /** @type {boolean} */
22122
+ let scheduled = false;
22123
+
22124
+ /**
22125
+ * Flush all queued callbacks.
22126
+ * @private
22127
+ */
22128
+ function flush() {
22129
+ const tasks = queue;
22130
+ queue = [];
22131
+ scheduled = false;
22132
+ for (let i = 0; i < tasks.length; i++) {
22133
+ tasks[i]();
22134
+ }
22135
+ }
22136
+
22137
+ /**
22138
+ * Schedule a callback to run on the next animation frame.
22139
+ * Multiple calls within the same frame are batched together.
22140
+ *
22141
+ * @param {VoidFunction} fn - The callback to execute.
22142
+ */
22143
+ function schedule(fn) {
22144
+ queue.push(fn);
22145
+ if (!scheduled) {
22146
+ scheduled = true;
22147
+ (typeof requestAnimationFrame === "function"
22148
+ ? requestAnimationFrame
22149
+ : setTimeout)(flush, 0);
22150
+ }
22151
+ }
22152
+
22153
+ /**
22154
+ * Represents an asynchronous animation operation.
22155
+ * Provides both callback-based and promise-based completion APIs.
22156
+ */
22157
+ class AnimateRunner {
22158
+ /**
22159
+ * Run an array of animation runners in sequence.
22160
+ * Each runner waits for the previous one to complete.
22161
+ *
22162
+ * @param {AnimateRunner[]} runners - Runners to execute in order.
22163
+ * @param {(ok: boolean) => void} callback - Invoked when all complete or one fails.
22164
+ */
22165
+ static chain(runners, callback) {
22166
+ let i = 0;
22167
+ const next = (ok = true) => {
22168
+ if (!ok || i >= runners.length) {
22169
+ callback(ok);
22170
+ return;
22171
+ }
22172
+ runners[i++].done(next);
22173
+ };
22174
+ next();
22175
+ }
22176
+
22177
+ /**
22178
+ * Waits for all animation runners to complete before invoking the callback.
22179
+ *
22180
+ * @param {AnimateRunner[]} runners - Active runners to wait for.
22181
+ * @param {(ok: boolean) => void} callback - Called when all runners complete.
22182
+ */
22183
+ static all(runners, callback) {
22184
+ let remaining = runners.length;
22185
+ let status = true;
22186
+ for (const r of runners) {
22187
+ r.done((result) => {
22188
+ status = status && result !== false;
22189
+ if (--remaining === 0) callback(status);
22190
+ });
22191
+ }
22192
+ }
22193
+
22194
+ /**
22195
+ * @param {import("../interface.ts").AnimationHost} [host] - Optional animation host.
22196
+ */
22197
+ constructor(host) {
22198
+ /** @type {import("../interface.ts").AnimationHost} */
22199
+ this.host = host || {};
22200
+
22201
+ /** @type {Array<(ok: boolean) => void>} */
22202
+ this._doneCallbacks = [];
22203
+
22204
+ /** @type {RunnerState} */
22205
+ this._state = RunnerState.INITIAL;
22206
+
22207
+ /** @type {Promise<void>|null} */
22208
+ this._promise = null;
22209
+
22210
+ /** @type {(fn: VoidFunction) => void} */
22211
+ this._schedule = schedule;
22212
+ }
22213
+
22214
+ /**
22215
+ * Sets or updates the animation host.
22216
+ * @param {import("../interface.ts").AnimationHost} host - The host object.
22217
+ */
22218
+ setHost(host) {
22219
+ this.host = host || {};
22220
+ }
22221
+
22222
+ /**
22223
+ * Registers a callback to be called once the animation completes.
22224
+ * If the animation is already complete, it's called immediately.
22225
+ *
22226
+ * @param {(ok: boolean) => void} fn - Completion callback.
22227
+ */
22228
+ done(fn) {
22229
+ if (this._state === RunnerState.DONE) {
22230
+ fn(true);
22231
+ } else {
22232
+ this._doneCallbacks.push(fn);
22233
+ }
22234
+ }
22235
+
22236
+ /**
22237
+ * Notifies the host of animation progress.
22238
+ * @param {...any} args - Progress arguments.
22239
+ */
22240
+ progress(...args) {
22241
+ this.host.progress?.(...args);
22242
+ }
22243
+
22244
+ /** Pauses the animation, if supported by the host. */
22245
+ pause() {
22246
+ this.host.pause?.();
22247
+ }
22248
+
22249
+ /** Resumes the animation, if supported by the host. */
22250
+ resume() {
22251
+ this.host.resume?.();
22252
+ }
22253
+
22254
+ /** Ends the animation successfully. */
22255
+ end() {
22256
+ this.host.end?.();
22257
+ this._finish(true);
22258
+ }
22259
+
22260
+ /** Cancels the animation. */
22261
+ cancel() {
22262
+ this.host.cancel?.();
22263
+ this._finish(false);
22264
+ }
22265
+
22266
+ /**
22267
+ * Marks the animation as complete on the next animation frame.
22268
+ * @param {boolean} [status=true] - True if successful, false if canceled.
22269
+ */
22270
+ complete(status = true) {
22271
+ if (this._state === RunnerState.INITIAL) {
22272
+ this._state = RunnerState.PENDING;
22273
+ this._schedule(() => this._finish(status));
22274
+ }
22275
+ }
22276
+
22277
+ /**
22278
+ * Returns a promise that resolves or rejects when the animation completes.
22279
+ * @returns {Promise<void>} Promise resolved on success or rejected on cancel.
22280
+ */
22281
+ getPromise() {
22282
+ if (!this._promise) {
22283
+ this._promise = new Promise((resolve, reject) => {
22284
+ this.done((success) => {
22285
+ if (success === false) reject();
22286
+ else resolve();
22287
+ });
22288
+ });
22289
+ }
22290
+ return this._promise;
22291
+ }
22292
+
22293
+ /** @inheritdoc */
22294
+ then(onFulfilled, onRejected) {
22295
+ return this.getPromise().then(onFulfilled, onRejected);
22296
+ }
22297
+
22298
+ /** @inheritdoc */
22299
+ catch(onRejected) {
22300
+ return this.getPromise().catch(onRejected);
22301
+ }
22302
+
22303
+ /** @inheritdoc */
22304
+ finally(onFinally) {
22305
+ return this.getPromise().finally(onFinally);
22306
+ }
22307
+
22308
+ /**
22309
+ * Completes the animation and invokes all done callbacks.
22310
+ * @private
22311
+ * @param {boolean} status - True if completed successfully, false if canceled.
22312
+ */
22313
+ _finish(status) {
22314
+ if (this._state === RunnerState.DONE) return;
22315
+ this._state = RunnerState.DONE;
22316
+
22317
+ const callbacks = this._doneCallbacks;
22318
+ for (let i = 0; i < callbacks.length; i++) {
22319
+ callbacks[i](status);
22320
+ }
22321
+ callbacks.length = 0;
22322
+ }
22323
+ }
22324
+
22232
22325
  const ANIMATE_TIMER_KEY = "$$animateCss";
22233
22326
 
22234
22327
  const ONE_SECOND = 1000;
@@ -22338,18 +22431,16 @@ function registerRestorableStyles(backup, node, properties) {
22338
22431
  function AnimateCssProvider() {
22339
22432
  let activeClasses;
22340
22433
  this.$get = [
22341
- "$$AnimateRunner",
22342
22434
  "$$animateCache",
22343
22435
  "$$rAFScheduler",
22344
22436
 
22345
22437
  /**
22346
22438
  *
22347
- * @param {*} $$AnimateRunner
22348
22439
  * @param {*} $$animateCache
22349
22440
  * @param {import("./raf-scheduler").RafScheduler} $$rAFScheduler
22350
22441
  * @returns
22351
22442
  */
22352
- function ($$AnimateRunner, $$animateCache, $$rAFScheduler) {
22443
+ function ($$animateCache, $$rAFScheduler) {
22353
22444
  const applyAnimationClasses = applyAnimationClassesFactory();
22354
22445
 
22355
22446
  function computeCachedCssStyles(
@@ -22747,7 +22838,7 @@ function AnimateCssProvider() {
22747
22838
  pause: null,
22748
22839
  };
22749
22840
 
22750
- runner = new $$AnimateRunner(runnerHost);
22841
+ runner = new AnimateRunner(runnerHost);
22751
22842
 
22752
22843
  waitUntilQuiet(start);
22753
22844
 
@@ -22846,7 +22937,7 @@ function AnimateCssProvider() {
22846
22937
  }
22847
22938
 
22848
22939
  function closeAndReturnNoopAnimator() {
22849
- runner = new $$AnimateRunner({
22940
+ runner = new AnimateRunner({
22850
22941
  end: endFn,
22851
22942
  cancel: cancelFn,
22852
22943
  });
@@ -23234,24 +23325,16 @@ function AnimateQueueProvider($animateProvider) {
23234
23325
  $injectTokens.$rootScope,
23235
23326
  $injectTokens.$injector,
23236
23327
  $injectTokens.$$animation,
23237
- $injectTokens.$$AnimateRunner,
23238
23328
  $injectTokens.$templateRequest,
23239
23329
  /**
23240
23330
  *
23241
- * @param {import('../core/scope/scope.js').Scope} $rootScope
23242
- * @param {import('../core/di/internal-injector.js').InjectorService} $injector
23331
+ * @param {ng.RootScopeService} $rootScope
23332
+ * @param {ng.InjectorService} $injector
23243
23333
  * @param {*} $$animation
23244
- * @param {*} $$AnimateRunner
23245
23334
  * @param {*} $templateRequest
23246
23335
  * @returns
23247
23336
  */
23248
- function (
23249
- $rootScope,
23250
- $injector,
23251
- $$animation,
23252
- $$AnimateRunner,
23253
- $templateRequest,
23254
- ) {
23337
+ function ($rootScope, $injector, $$animation, $templateRequest) {
23255
23338
  const activeAnimationsLookup = new Map();
23256
23339
  const disabledElementsLookup = new Map();
23257
23340
 
@@ -23459,7 +23542,7 @@ function AnimateQueueProvider($animateProvider) {
23459
23542
 
23460
23543
  // we create a fake runner with a working promise.
23461
23544
  // These methods will become available after the digest has passed
23462
- const runner = new $$AnimateRunner();
23545
+ const runner = new AnimateRunner();
23463
23546
 
23464
23547
  // this is used to trigger callbacks in postDigest mode
23465
23548
  const runInNextPostDigestOrNow = postDigestTaskFactory();
@@ -23904,14 +23987,12 @@ AnimateJsProvider.$inject = [$injectTokens.$animate + "Provider"];
23904
23987
  function AnimateJsProvider($animateProvider) {
23905
23988
  this.$get = [
23906
23989
  $injectTokens.$injector,
23907
- "$$AnimateRunner",
23908
23990
  /**
23909
23991
  *
23910
23992
  * @param {ng.InjectorService} $injector
23911
- * @param {*} $$AnimateRunner
23912
23993
  * @returns
23913
23994
  */
23914
- function ($injector, $$AnimateRunner) {
23995
+ function ($injector) {
23915
23996
  const applyAnimationClasses = applyAnimationClassesFactory();
23916
23997
  // $animateJs(element, 'enter');
23917
23998
  return function (element, event, classes, options) {
@@ -23998,7 +24079,7 @@ function AnimateJsProvider($animateProvider) {
23998
24079
  runner.end();
23999
24080
  } else {
24000
24081
  close();
24001
- runner = new $$AnimateRunner();
24082
+ runner = new AnimateRunner();
24002
24083
  runner.complete(true);
24003
24084
  }
24004
24085
  return runner;
@@ -24008,31 +24089,53 @@ function AnimateJsProvider($animateProvider) {
24008
24089
  return runner;
24009
24090
  }
24010
24091
 
24011
- runner = new $$AnimateRunner();
24012
- let closeActiveAnimations;
24092
+ runner = new AnimateRunner();
24093
+
24013
24094
  const chain = [];
24014
24095
 
24015
24096
  if (before) {
24016
- chain.push((fn) => {
24017
- closeActiveAnimations = before(fn);
24097
+ const runnerBefore = new AnimateRunner({
24098
+ end(fn) {
24099
+ // call the before animation function, then mark runner done
24100
+ const endFn = before(fn) || (() => {});
24101
+ endFn();
24102
+ },
24103
+ cancel() {
24104
+ (before(true) || (() => {}))();
24105
+ },
24018
24106
  });
24107
+ chain.push(runnerBefore);
24019
24108
  }
24020
24109
 
24021
24110
  if (chain.length) {
24022
- chain.push((fn) => {
24023
- applyOptions();
24024
- fn(true);
24111
+ const runnerApplyOptions = new AnimateRunner({
24112
+ end(fn) {
24113
+ applyOptions();
24114
+ fn(true);
24115
+ },
24116
+ cancel() {
24117
+ applyOptions();
24118
+ },
24025
24119
  });
24120
+ chain.push(runnerApplyOptions);
24026
24121
  } else {
24027
24122
  applyOptions();
24028
24123
  }
24029
24124
 
24030
24125
  if (after) {
24031
- chain.push((fn) => {
24032
- closeActiveAnimations = after(fn);
24126
+ const runnerAfter = new AnimateRunner({
24127
+ end(fn) {
24128
+ const endFn = after(fn) || (() => {});
24129
+ endFn();
24130
+ },
24131
+ cancel() {
24132
+ (after(true) || (() => {}))();
24133
+ },
24033
24134
  });
24135
+ chain.push(runnerAfter);
24034
24136
  }
24035
24137
 
24138
+ // finally, set host for overall runner
24036
24139
  runner.setHost({
24037
24140
  end() {
24038
24141
  endAnimations();
@@ -24042,7 +24145,7 @@ function AnimateJsProvider($animateProvider) {
24042
24145
  },
24043
24146
  });
24044
24147
 
24045
- $$AnimateRunner.chain(chain, onComplete);
24148
+ AnimateRunner.chain(chain, onComplete);
24046
24149
  return runner;
24047
24150
 
24048
24151
  function onComplete(success) {
@@ -24052,7 +24155,6 @@ function AnimateJsProvider($animateProvider) {
24052
24155
 
24053
24156
  function endAnimations(cancelled) {
24054
24157
  if (!animationClosed) {
24055
- (closeActiveAnimations || (() => {}))(cancelled);
24056
24158
  onComplete(cancelled);
24057
24159
  }
24058
24160
  }
@@ -24091,7 +24193,7 @@ function AnimateJsProvider($animateProvider) {
24091
24193
  value = value.start();
24092
24194
  }
24093
24195
 
24094
- if (value instanceof $$AnimateRunner) {
24196
+ if (value instanceof AnimateRunner) {
24095
24197
  value.done(onDone);
24096
24198
  } else if (isFunction(value)) {
24097
24199
  // optional onEnd / onCancel callback
@@ -24128,7 +24230,7 @@ function AnimateJsProvider($animateProvider) {
24128
24230
  }
24129
24231
  };
24130
24232
 
24131
- runner = new $$AnimateRunner({
24233
+ runner = new AnimateRunner({
24132
24234
  end() {
24133
24235
  onAnimationComplete();
24134
24236
  },
@@ -24224,7 +24326,7 @@ function AnimateJsProvider($animateProvider) {
24224
24326
  }
24225
24327
 
24226
24328
  if (runners.length) {
24227
- $$AnimateRunner.all(runners, callback);
24329
+ AnimateRunner.all(runners, callback);
24228
24330
  } else {
24229
24331
  callback();
24230
24332
  }
@@ -24284,25 +24386,17 @@ function AnimationProvider() {
24284
24386
  this.$get = [
24285
24387
  $injectTokens.$rootScope,
24286
24388
  $injectTokens.$injector,
24287
- $injectTokens.$$AnimateRunner,
24288
24389
  $injectTokens.$$rAFScheduler,
24289
24390
  $injectTokens.$$animateCache,
24290
24391
  /**
24291
24392
  *
24292
24393
  * @param {ng.RootScopeService} $rootScope
24293
24394
  * @param {import("../core/di/internal-injector").InjectorService} $injector
24294
- * @param {*} $$AnimateRunner
24295
24395
  * @param {import("./raf-scheduler").RafScheduler} $$rAFScheduler
24296
24396
  * @param {*} $$animateCache
24297
24397
  * @returns
24298
24398
  */
24299
- function (
24300
- $rootScope,
24301
- $injector,
24302
- $$AnimateRunner,
24303
- $$rAFScheduler,
24304
- $$animateCache,
24305
- ) {
24399
+ function ($rootScope, $injector, $$rAFScheduler, $$animateCache) {
24306
24400
  const animationQueue = [];
24307
24401
  const applyAnimationClasses = applyAnimationClassesFactory();
24308
24402
 
@@ -24403,7 +24497,7 @@ function AnimationProvider() {
24403
24497
  // these runner methods will get later updated with the
24404
24498
  // methods leading into the driver's end/cancel methods
24405
24499
  // for now they just stop the animation from starting
24406
- const runner = new $$AnimateRunner({
24500
+ const runner = new AnimateRunner({
24407
24501
  end() {
24408
24502
  close();
24409
24503
  },
@@ -24958,16 +25052,14 @@ function AnimateCssDriverProvider($$animationProvider) {
24958
25052
  */
24959
25053
  this.$get = [
24960
25054
  "$animateCss",
24961
- "$$AnimateRunner",
24962
25055
  "$rootElement",
24963
25056
  /**
24964
25057
  *
24965
25058
  * @param {*} $animateCss
24966
- * @param {typeof import('./animate-runner.js').AnimateRunner} $$AnimateRunner
24967
25059
  * @param {Element} $rootElement
24968
25060
  * @returns
24969
25061
  */
24970
- function ($animateCss, $$AnimateRunner, $rootElement) {
25062
+ function ($animateCss, $rootElement) {
24971
25063
  const bodyNode = document.body;
24972
25064
  const rootNode = $rootElement;
24973
25065
 
@@ -25040,7 +25132,7 @@ function AnimateCssDriverProvider($$animationProvider) {
25040
25132
  runner.complete();
25041
25133
  });
25042
25134
 
25043
- runner = new $$AnimateRunner({
25135
+ runner = new AnimateRunner({
25044
25136
  end: endFn,
25045
25137
  cancel: endFn,
25046
25138
  });
@@ -25151,12 +25243,12 @@ function AnimateCssDriverProvider($$animationProvider) {
25151
25243
  animationRunners.push(animation.start());
25152
25244
  });
25153
25245
 
25154
- const runner = new $$AnimateRunner({
25246
+ const runner = new AnimateRunner({
25155
25247
  end: endFn,
25156
25248
  cancel: endFn, // CSS-driven animations cannot be cancelled, only ended
25157
25249
  });
25158
25250
 
25159
- $$AnimateRunner.all(animationRunners, (status) => {
25251
+ AnimateRunner.all(animationRunners, (status) => {
25160
25252
  runner.complete(status);
25161
25253
  });
25162
25254
 
@@ -25226,8 +25318,11 @@ function AnimateJsDriverProvider($$animationProvider) {
25226
25318
  $$animationProvider.drivers.push("$$animateJsDriver");
25227
25319
  this.$get = [
25228
25320
  "$$animateJs",
25229
- "$$AnimateRunner",
25230
- function ($$animateJs, $$AnimateRunner) {
25321
+ /**
25322
+ *
25323
+ * @param {*} $$animateJs
25324
+ */
25325
+ function ($$animateJs) {
25231
25326
  return function initDriverFn(animationDetails) {
25232
25327
  if (animationDetails.from && animationDetails.to) {
25233
25328
  const fromAnimation = prepareAnimation(animationDetails.from);
@@ -25246,9 +25341,9 @@ function AnimateJsDriverProvider($$animationProvider) {
25246
25341
  animationRunners.push(toAnimation.start());
25247
25342
  }
25248
25343
 
25249
- $$AnimateRunner.all(animationRunners, done);
25344
+ AnimateRunner.all(animationRunners, done);
25250
25345
 
25251
- const runner = new $$AnimateRunner({
25346
+ const runner = new AnimateRunner({
25252
25347
  end: endFnFactory(),
25253
25348
  cancel: endFnFactory(),
25254
25349
  });
@@ -35454,31 +35549,26 @@ ngInjectDirective.$inject = [$injectTokens.$log, $injectTokens.$injector];
35454
35549
  /**
35455
35550
  * @param {ng.LogService} $log
35456
35551
  * @param {ng.InjectorService} $injector
35457
- * @returns {import('interface.ts').Directive}
35552
+ * @returns {ng.Directive}
35458
35553
  */
35459
35554
  function ngInjectDirective($log, $injector) {
35460
35555
  return {
35461
35556
  restrict: "A",
35462
35557
  link(scope, _element, attrs) {
35463
- const expr = attrs["ngInject"];
35464
-
35558
+ const expr = attrs.ngInject;
35465
35559
  if (!expr) return;
35466
- // Match any identifier that starts with $, or ends with Service/Factory
35467
- // Example matches: $http, userService, authFactory
35468
- const replacedExpr = expr.replace(
35469
- /(\$[\w]+|[\w]+(?:Service|Factory))/g,
35470
- (match, name) => {
35471
- try {
35472
- const service = $injector.get(name);
35473
- scope.$target[name] = service;
35474
- return name;
35475
- } catch {
35476
- $log.warn(`Injectable ${name} not found in $injector`);
35477
- return match;
35478
- }
35479
- },
35480
- );
35481
- scope.$apply(replacedExpr);
35560
+ const tokens = expr
35561
+ .split(";")
35562
+ .map((s) => s.trim())
35563
+ .filter(Boolean);
35564
+
35565
+ for (const name of tokens) {
35566
+ if ($injector.has(name)) {
35567
+ scope[name] = $injector.get(name);
35568
+ } else {
35569
+ $log.warn(`Injectable ${name} not found in $injector`);
35570
+ }
35571
+ }
35482
35572
  },
35483
35573
  };
35484
35574
  }
@@ -35954,8 +36044,8 @@ class WorkerProvider {
35954
36044
 
35955
36045
  /**
35956
36046
  * Initializes core `ng` module.
35957
- * @param {import('./angular.js').Angular} angular
35958
- * @returns {import('./core/di/ng-module.js').NgModule} `ng` module
36047
+ * @param {ng.Angular} angular
36048
+ * @returns {ng.NgModule} `ng` module
35959
36049
  */
35960
36050
  function registerNgModule(angular) {
35961
36051
  return angular
@@ -35964,14 +36054,14 @@ function registerNgModule(angular) {
35964
36054
  [],
35965
36055
  [
35966
36056
  $injectTokens.$provide,
35967
- /** @param {import("./interface.ts").Provider} $provide */
36057
+ /** @param {ng.ProvideService} $provide */
35968
36058
  ($provide) => {
35969
36059
  // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
35970
36060
  $provide.provider({
35971
36061
  $$sanitizeUri: SanitizeUriProvider,
35972
36062
  });
35973
- $provide.value("$window", window);
35974
- $provide.value("$document", document);
36063
+ $provide.value($injectTokens.$window, window);
36064
+ $provide.value($injectTokens.$document, document);
35975
36065
  $provide
35976
36066
  .provider($injectTokens.$compile, CompileProvider)
35977
36067
  .directive({
@@ -35984,6 +36074,7 @@ function registerNgModule(angular) {
35984
36074
  ngBind: ngBindDirective,
35985
36075
  ngBindHtml: ngBindHtmlDirective,
35986
36076
  ngBindTemplate: ngBindTemplateDirective,
36077
+ ngChannel: ngChannelDirective,
35987
36078
  ngClass: ngClassDirective,
35988
36079
  ngClassEven: ngClassEvenDirective,
35989
36080
  ngClassOdd: ngClassOddDirective,
@@ -36036,6 +36127,7 @@ function registerNgModule(angular) {
36036
36127
  input: hiddenInputBrowserCacheDirective,
36037
36128
  ngAnimateSwap: ngAnimateSwapDirective,
36038
36129
  ngAnimateChildren: $$AnimateChildrenDirective,
36130
+ // aria directives
36039
36131
  ngChecked: ngCheckedAriaDirective,
36040
36132
  ngClick: ngClickAriaDirective,
36041
36133
  ngDblclick: ngDblclickAriaDirective,
@@ -36047,12 +36139,12 @@ function registerNgModule(angular) {
36047
36139
  ngReadonly: ngReadonlyAriaDirective,
36048
36140
  ngRequired: ngRequiredAriaDirective,
36049
36141
  ngValue: ngValueAriaDirective,
36142
+ // router directives
36050
36143
  ngSref: $StateRefDirective,
36051
36144
  ngSrefActive: $StateRefActiveDirective,
36052
36145
  ngSrefActiveEq: $StateRefActiveDirective,
36053
36146
  ngState: $StateRefDynamicDirective,
36054
36147
  ngView: ngView,
36055
- ngChannel: ngChannelDirective,
36056
36148
  })
36057
36149
  .directive({
36058
36150
  ngView: $ViewDirectiveFill,
@@ -36070,8 +36162,6 @@ function registerNgModule(angular) {
36070
36162
  $$animateJsDriver: AnimateJsDriverProvider,
36071
36163
  $$animateCache: AnimateCacheProvider,
36072
36164
  $$animateQueue: AnimateQueueProvider,
36073
- $$AnimateRunner: AnimateRunnerFactoryProvider,
36074
- $$animateAsyncRun: AnimateAsyncRunFactoryProvider,
36075
36165
  $controller: ControllerProvider,
36076
36166
  $exceptionHandler: ExceptionHandlerProvider,
36077
36167
  $filter: FilterProvider,
@@ -36124,20 +36214,36 @@ class Angular {
36124
36214
  constructor() {
36125
36215
  this.$cache = Cache;
36126
36216
 
36127
- /** @type {import('./services/pubsub/pubsub.js').PubSub} */
36217
+ /** @type {ng.PubSubService} */
36128
36218
  this.$eventBus = EventBus;
36129
36219
 
36130
36220
  /**
36131
36221
  * @type {string} `version` from `package.json`
36132
36222
  */
36133
- this.version = "0.10.0"; //inserted via rollup plugin
36223
+ this.version = "0.11.0"; //inserted via rollup plugin
36134
36224
 
36135
36225
  /** @type {!Array<string|any>} */
36136
36226
  this.bootsrappedModules = [];
36137
36227
 
36228
+ /**
36229
+ * Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
36230
+ *
36231
+ * @type {(element: Element, name: string?) => ng.Scope|undefined}
36232
+ */
36138
36233
  this.getController = getController;
36234
+
36235
+ /**
36236
+ * Return instance of InjectorService attached to element
36237
+ * @type {(Element) => ng.InjectorService}
36238
+ */
36139
36239
  this.getInjector = getInjector;
36240
+
36241
+ /**
36242
+ * Gets scope for a given element.
36243
+ * @type {(Element) => *}
36244
+ */
36140
36245
  this.getScope = getScope;
36246
+
36141
36247
  this.errorHandlingConfig = errorHandlingConfig;
36142
36248
  this.$t = $injectTokens;
36143
36249
 
@@ -36230,7 +36336,8 @@ class Angular {
36230
36336
  */
36231
36337
  (scope, el, compile, $injector) => {
36232
36338
  // ng-route deps
36233
- this.$injector = $injector;
36339
+ this.$injector = $injector; // TODO refactor away as this as this prevents multiple apps from being used
36340
+
36234
36341
  setCacheData(el, "$injector", $injector);
36235
36342
 
36236
36343
  const compileFn = compile(el);