fix(ivy): bindings should be checked in components created dynamically by root component' (#26864)

PR Close #26864
This commit is contained in:
Kara Erickson
2018-10-30 14:38:38 -07:00
parent aadbc8a9d3
commit 911bfef04c
2 changed files with 65 additions and 23 deletions

View File

@ -421,6 +421,7 @@ function renderComponentOrTemplate<T>(
// Element was stored at 0 in data and directive was stored at 0 in directives
// in renderComponent()
setHostBindings(getTView(), hostView);
refreshDynamicEmbeddedViews(hostView);
componentRefresh(HEADER_OFFSET, false);
}
} finally {
@ -1828,7 +1829,7 @@ export function containerRefreshEnd(): void {
* Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes them
* by executing an associated template function.
*/
function refreshDynamicEmbeddedViews(lViewData: LViewData) {
export function refreshDynamicEmbeddedViews(lViewData: LViewData) {
for (let current = getLViewChild(lViewData); current !== null; current = current[NEXT]) {
// Note: current can be an LViewData or an LContainer instance, but here we are only interested
// in LContainer. We can tell it's an LContainer because its length is less than the LViewData