@angular/core 12.0.0-rc.2 → 12.0.2

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,5 +1,5 @@
1
1
  /**
2
- * @license Angular v12.0.0-rc.2
2
+ * @license Angular v12.0.2
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7693,11 +7693,25 @@
7693
7693
  var toCall = destroyHooks[i + 1];
7694
7694
  if (Array.isArray(toCall)) {
7695
7695
  for (var j = 0; j < toCall.length; j += 2) {
7696
- toCall[j + 1].call(context[toCall[j]]);
7696
+ var callContext = context[toCall[j]];
7697
+ var hook = toCall[j + 1];
7698
+ profiler(4 /* LifecycleHookStart */, callContext, hook);
7699
+ try {
7700
+ hook.call(callContext);
7701
+ }
7702
+ finally {
7703
+ profiler(5 /* LifecycleHookEnd */, callContext, hook);
7704
+ }
7697
7705
  }
7698
7706
  }
7699
7707
  else {
7700
- toCall.call(context);
7708
+ profiler(4 /* LifecycleHookStart */, context, toCall);
7709
+ try {
7710
+ toCall.call(context);
7711
+ }
7712
+ finally {
7713
+ profiler(5 /* LifecycleHookEnd */, context, toCall);
7714
+ }
7701
7715
  }
7702
7716
  }
7703
7717
  }
@@ -12372,17 +12386,19 @@
12372
12386
  *
12373
12387
  * @usageNotes
12374
12388
  * Given the following DOM structure:
12389
+ *
12375
12390
  * ```html
12376
- * <my-app>
12391
+ * <app-root>
12377
12392
  * <div>
12378
12393
  * <child-comp></child-comp>
12379
12394
  * </div>
12380
- * </my-app>
12395
+ * </app-root>
12381
12396
  * ```
12397
+ *
12382
12398
  * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`
12383
12399
  * associated with this DOM element.
12384
12400
  *
12385
- * Calling the function on `<my-app>` will return the `MyApp` instance.
12401
+ * Calling the function on `<app-root>` will return the `MyApp` instance.
12386
12402
  *
12387
12403
  *
12388
12404
  * @param element DOM element from which the component should be retrieved.
@@ -12511,12 +12527,14 @@
12511
12527
  *
12512
12528
  * @usageNotes
12513
12529
  * Given the following DOM structure:
12514
- * ```
12515
- * <my-app>
12530
+ *
12531
+ * ```html
12532
+ * <app-root>
12516
12533
  * <button my-button></button>
12517
12534
  * <my-comp></my-comp>
12518
- * </my-app>
12535
+ * </app-root>
12519
12536
  * ```
12537
+ *
12520
12538
  * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
12521
12539
  * directive that is associated with the DOM node.
12522
12540
  *
@@ -12636,14 +12654,16 @@
12636
12654
  *
12637
12655
  * @usageNotes
12638
12656
  * Given the following DOM structure:
12639
- * ```
12640
- * <my-app>
12641
- * <div (click)="doSomething()"></div>
12642
- * </my-app>
12643
12657
  *
12658
+ * ```html
12659
+ * <app-root>
12660
+ * <div (click)="doSomething()"></div>
12661
+ * </app-root>
12644
12662
  * ```
12663
+ *
12645
12664
  * Calling `getListeners` on `<div>` will return an object that looks as follows:
12646
- * ```
12665
+ *
12666
+ * ```ts
12647
12667
  * {
12648
12668
  * name: 'click',
12649
12669
  * element: <div>,
@@ -15707,8 +15727,11 @@
15707
15727
  var lCleanup = getOrCreateLViewCleanup(lView);
15708
15728
  ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);
15709
15729
  var processOutputs = true;
15710
- // add native event listener - applicable to elements only
15711
- if (tNode.type & 3 /* AnyRNode */) {
15730
+ // Adding a native event listener is applicable when:
15731
+ // - The corresponding TNode represents a DOM element.
15732
+ // - The event target has a resolver (usually resulting in a global object,
15733
+ // such as `window` or `document`).
15734
+ if ((tNode.type & 3 /* AnyRNode */) || eventTargetResolver) {
15712
15735
  var native = getNativeByTNode(tNode, lView);
15713
15736
  var target = eventTargetResolver ? eventTargetResolver(native) : native;
15714
15737
  var lCleanupIndex = lCleanup.length;
@@ -22008,7 +22031,7 @@
22008
22031
  /**
22009
22032
  * @publicApi
22010
22033
  */
22011
- var VERSION = new Version('12.0.0-rc.2');
22034
+ var VERSION = new Version('12.0.2');
22012
22035
 
22013
22036
  /**
22014
22037
  * @license
@@ -23234,7 +23257,7 @@
23234
23257
  *
23235
23258
  * ```typescript
23236
23259
  * @Component({
23237
- * selector: 'my-app',
23260
+ * selector: 'app-root',
23238
23261
  * template: `Number of ticks: {{numberOfTicks}}`
23239
23262
  * changeDetection: ChangeDetectionStrategy.OnPush,
23240
23263
  * })
@@ -23354,7 +23377,7 @@
23354
23377
  * }
23355
23378
  *
23356
23379
  * @Component({
23357
- * selector: 'my-app',
23380
+ * selector: 'app-root',
23358
23381
  * providers: [DataProvider],
23359
23382
  * template: `
23360
23383
  * Live Update: <input type="checkbox" [(ngModel)]="live">
@@ -27826,11 +27849,11 @@
27826
27849
  * NgModule the component belongs to. We keep the list of compiled components here so that the
27827
27850
  * TestBed can reset it later.
27828
27851
  */
27829
- var ownerNgModule = new Map();
27830
- var verifiedNgModule = new Map();
27852
+ var ownerNgModule = new WeakMap();
27853
+ var verifiedNgModule = new WeakMap();
27831
27854
  function resetCompiledComponents() {
27832
- ownerNgModule = new Map();
27833
- verifiedNgModule = new Map();
27855
+ ownerNgModule = new WeakMap();
27856
+ verifiedNgModule = new WeakMap();
27834
27857
  moduleQueue.length = 0;
27835
27858
  }
27836
27859
  /**
@@ -34102,6 +34125,7 @@
34102
34125
  exports.ɵRender3ComponentFactory = ComponentFactory$1;
34103
34126
  exports.ɵRender3ComponentRef = ComponentRef$1;
34104
34127
  exports.ɵRender3NgModuleRef = NgModuleRef$1;
34128
+ exports.ɵRuntimeError = RuntimeError;
34105
34129
  exports.ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;
34106
34130
  exports.ɵSWITCH_COMPILE_COMPONENT__POST_R3__ = SWITCH_COMPILE_COMPONENT__POST_R3__;
34107
34131
  exports.ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__ = SWITCH_COMPILE_DIRECTIVE__POST_R3__;