refactor(ivy): use generated consts value to set binding index (#25533)

PR Close #25533
This commit is contained in:
Kara Erickson
2018-08-16 18:53:21 -07:00
committed by Jason Aden
parent 4708cb91ef
commit f2aa9c6a7f
52 changed files with 2296 additions and 1767 deletions

View File

@ -53,6 +53,15 @@ export function defineComponent<T>(componentDefinition: {
*/
factory: () => T;
/**
* The number of nodes, local refs, and pipes in this component template.
*
* Used to calculate the length of the component's LViewData array, so we
* can pre-fill the array and set the binding start index.
*/
// TODO(kara): remove queries from this count
consts: number;
/**
* Static attributes to set on host element.
*
@ -245,6 +254,7 @@ export function defineComponent<T>(componentDefinition: {
const def: ComponentDefInternal<any> = {
type: type,
diPublic: null,
consts: componentDefinition.consts,
factory: componentDefinition.factory,
template: componentDefinition.template || null !,
hostBindings: componentDefinition.hostBindings || null,