(appRef: ApplicationRef)
| 360 | } |
| 361 | |
| 362 | attachToAppRef(appRef: ApplicationRef) { |
| 363 | if (this._attachedToViewContainer) { |
| 364 | throw new RuntimeError( |
| 365 | RuntimeErrorCode.VIEW_ALREADY_ATTACHED, |
| 366 | ngDevMode && 'This view is already attached to a ViewContainer!', |
| 367 | ); |
| 368 | } |
| 369 | this._appRef = appRef; |
| 370 | const isRoot = isRootView(this._lView); |
| 371 | const declarationContainer = this._lView[DECLARATION_LCONTAINER]; |
| 372 | if (declarationContainer !== null && !isRoot) { |
| 373 | trackMovedView(declarationContainer, this._lView); |
| 374 | } |
| 375 | updateAncestorTraversalFlagsOnAttach(this._lView); |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | /** |
no test coverage detected