(hostLView: LView, componentHostIdx: number)
| 30 | import {executeTemplate} from './shared'; |
| 31 | |
| 32 | export function renderComponent(hostLView: LView, componentHostIdx: number) { |
| 33 | ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode'); |
| 34 | const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); |
| 35 | const componentTView = componentView[TVIEW]; |
| 36 | syncViewWithBlueprint(componentTView, componentView); |
| 37 | |
| 38 | const hostRNode = componentView[HOST]; |
| 39 | // Populate an LView with hydration info retrieved from the DOM via TransferState. |
| 40 | if (hostRNode !== null && componentView[HYDRATION] === null) { |
| 41 | componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]); |
| 42 | } |
| 43 | |
| 44 | profiler(ProfilerEvent.ComponentStart); |
| 45 | |
| 46 | try { |
| 47 | renderView(componentTView, componentView, componentView[CONTEXT]); |
| 48 | } finally { |
| 49 | profiler(ProfilerEvent.ComponentEnd, componentView[CONTEXT] as any as {}); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Syncs an LView instance with its blueprint if they have gotten out of sync. |
no test coverage detected
searching dependent graphs…