mirror of
				https://github.com/Redocly/redoc.git
				synced 2025-10-29 06:47:26 +03:00 
			
		
		
		
	Fix content projector after angular2 update
This commit is contained in:
		
							parent
							
								
									73ec40072d
								
							
						
					
					
						commit
						5c6d57ab2c
					
				|  | @ -29,13 +29,13 @@ export class ContentProjector { | |||
|     let parentCompRef = parentView.createComponent(componentFactory, null, contextInjector, [projectedNodes]); | ||||
| 
 | ||||
|     // using private property to get AppElement instance
 | ||||
|     let appElement = (<any>parentView)._element; | ||||
|     appElement.nestedViews = appElement.nestedViews || []; | ||||
|     let viewContainer = (<any>parentView)._element; | ||||
|     viewContainer.nestedViews = viewContainer.nestedViews || []; | ||||
|     for (let i=0; i < componentRefs.length; i++) { | ||||
|       let compRef = componentRefs[i]; | ||||
|       appElement.nestedViews.push((<any>compRef.hostView).internalView); | ||||
|       // attach appElement to parentView change detector
 | ||||
|       (<any>compRef.hostView).internalView.addToContentChildren(appElement); | ||||
|       // attach view to viewContainer change detector
 | ||||
|       viewContainer.nestedViews.push((<any>compRef.hostView).internalView); | ||||
|       (<any>compRef.hostView).internalView.viewContainer = viewContainer; | ||||
|     } | ||||
|     return parentCompRef; | ||||
|   } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user