@angular/core 11.0.7 → 11.0.8
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.
- package/bundles/core-testing.umd.js +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +19 -12
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +4 -4
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +3 -3
- package/core.metadata.json +1 -1
- package/esm2015/src/linker/view_container_ref.js +2 -2
- package/esm2015/src/render3/view_ref.js +23 -12
- package/esm2015/src/version.js +1 -1
- package/fesm2015/core.js +19 -12
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
package/bundles/core.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v11.0.
|
|
2
|
+
* @license Angular v11.0.8
|
|
3
3
|
* (c) 2010-2020 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -21725,7 +21725,7 @@
|
|
|
21725
21725
|
/**
|
|
21726
21726
|
* @publicApi
|
|
21727
21727
|
*/
|
|
21728
|
-
var VERSION = new Version('11.0.
|
|
21728
|
+
var VERSION = new Version('11.0.8');
|
|
21729
21729
|
|
|
21730
21730
|
/**
|
|
21731
21731
|
* @license
|
|
@@ -22898,7 +22898,7 @@
|
|
|
22898
22898
|
this._lView = _lView;
|
|
22899
22899
|
this._cdRefInjectingView = _cdRefInjectingView;
|
|
22900
22900
|
this._appRef = null;
|
|
22901
|
-
this.
|
|
22901
|
+
this._attachedToViewContainer = false;
|
|
22902
22902
|
}
|
|
22903
22903
|
Object.defineProperty(ViewRef.prototype, "rootNodes", {
|
|
22904
22904
|
get: function () {
|
|
@@ -22927,12 +22927,19 @@
|
|
|
22927
22927
|
if (this._appRef) {
|
|
22928
22928
|
this._appRef.detachView(this);
|
|
22929
22929
|
}
|
|
22930
|
-
else if (this.
|
|
22931
|
-
var
|
|
22932
|
-
if (
|
|
22933
|
-
|
|
22930
|
+
else if (this._attachedToViewContainer) {
|
|
22931
|
+
var parent = this._lView[PARENT];
|
|
22932
|
+
if (isLContainer(parent)) {
|
|
22933
|
+
var viewRefs = parent[VIEW_REFS];
|
|
22934
|
+
var index = viewRefs ? viewRefs.indexOf(this) : -1;
|
|
22935
|
+
if (index > -1) {
|
|
22936
|
+
ngDevMode &&
|
|
22937
|
+
assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');
|
|
22938
|
+
detachView(parent, index);
|
|
22939
|
+
removeFromArray(viewRefs, index);
|
|
22940
|
+
}
|
|
22934
22941
|
}
|
|
22935
|
-
this.
|
|
22942
|
+
this._attachedToViewContainer = false;
|
|
22936
22943
|
}
|
|
22937
22944
|
destroyLView(this._lView[TVIEW], this._lView);
|
|
22938
22945
|
};
|
|
@@ -23124,18 +23131,18 @@
|
|
|
23124
23131
|
ViewRef.prototype.checkNoChanges = function () {
|
|
23125
23132
|
checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);
|
|
23126
23133
|
};
|
|
23127
|
-
ViewRef.prototype.attachToViewContainerRef = function (
|
|
23134
|
+
ViewRef.prototype.attachToViewContainerRef = function () {
|
|
23128
23135
|
if (this._appRef) {
|
|
23129
23136
|
throw new Error('This view is already attached directly to the ApplicationRef!');
|
|
23130
23137
|
}
|
|
23131
|
-
this.
|
|
23138
|
+
this._attachedToViewContainer = true;
|
|
23132
23139
|
};
|
|
23133
23140
|
ViewRef.prototype.detachFromAppRef = function () {
|
|
23134
23141
|
this._appRef = null;
|
|
23135
23142
|
renderDetachView(this._lView[TVIEW], this._lView);
|
|
23136
23143
|
};
|
|
23137
23144
|
ViewRef.prototype.attachToAppRef = function (appRef) {
|
|
23138
|
-
if (this.
|
|
23145
|
+
if (this._attachedToViewContainer) {
|
|
23139
23146
|
throw new Error('This view is already attached to a ViewContainer!');
|
|
23140
23147
|
}
|
|
23141
23148
|
this._appRef = appRef;
|
|
@@ -23547,7 +23554,7 @@
|
|
|
23547
23554
|
if (parentRNode !== null) {
|
|
23548
23555
|
addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
|
|
23549
23556
|
}
|
|
23550
|
-
viewRef.attachToViewContainerRef(
|
|
23557
|
+
viewRef.attachToViewContainerRef();
|
|
23551
23558
|
addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);
|
|
23552
23559
|
return viewRef;
|
|
23553
23560
|
};
|