parent
3557849371
commit
ad4300f52b
@ -74,10 +74,11 @@ export function ɵɵtemplate(
|
|||||||
// TODO: consider a separate node type for templates
|
// TODO: consider a separate node type for templates
|
||||||
const tContainerNode = containerInternal(
|
const tContainerNode = containerInternal(
|
||||||
lView, index, tagName || null, getConstant<TAttributes>(tViewConsts, attrsIndex));
|
lView, index, tagName || null, getConstant<TAttributes>(tViewConsts, attrsIndex));
|
||||||
const localRefs = getConstant<string[]>(tViewConsts, localRefsIndex);
|
|
||||||
if (tView.firstCreatePass) {
|
if (tView.firstCreatePass) {
|
||||||
ngDevMode && ngDevMode.firstCreatePass++;
|
ngDevMode && ngDevMode.firstCreatePass++;
|
||||||
resolveDirectives(tView, lView, tContainerNode, localRefs);
|
resolveDirectives(
|
||||||
|
tView, lView, tContainerNode, getConstant<string[]>(tViewConsts, localRefsIndex));
|
||||||
registerPostOrderHooks(tView, tContainerNode);
|
registerPostOrderHooks(tView, tContainerNode);
|
||||||
|
|
||||||
const embeddedTView = tContainerNode.tViews = createTView(
|
const embeddedTView = tContainerNode.tViews = createTView(
|
||||||
@ -96,7 +97,8 @@ export function ɵɵtemplate(
|
|||||||
if (isDirectiveHost(tContainerNode)) {
|
if (isDirectiveHost(tContainerNode)) {
|
||||||
createDirectivesInstances(tView, lView, tContainerNode);
|
createDirectivesInstances(tView, lView, tContainerNode);
|
||||||
}
|
}
|
||||||
if (localRefs != null) {
|
|
||||||
|
if (localRefsIndex !== null) {
|
||||||
saveResolvedLocalsInData(lView, tContainerNode, localRefExtractor);
|
saveResolvedLocalsInData(lView, tContainerNode, localRefExtractor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,7 +555,7 @@ export function saveResolvedLocalsInData(
|
|||||||
viewData: LView, tNode: TDirectiveHostNode,
|
viewData: LView, tNode: TDirectiveHostNode,
|
||||||
localRefExtractor: LocalRefExtractor = getNativeByTNode): void {
|
localRefExtractor: LocalRefExtractor = getNativeByTNode): void {
|
||||||
const localNames = tNode.localNames;
|
const localNames = tNode.localNames;
|
||||||
if (localNames) {
|
if (localNames !== null) {
|
||||||
let localIndex = tNode.index + 1;
|
let localIndex = tNode.index + 1;
|
||||||
for (let i = 0; i < localNames.length; i += 2) {
|
for (let i = 0; i < localNames.length; i += 2) {
|
||||||
const index = localNames[i + 1] as number;
|
const index = localNames[i + 1] as number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user