fix(ivy): host bindings should support array/object literals (#25583)

PR Close #25583
This commit is contained in:
Kara Erickson
2018-08-20 13:03:03 -07:00
committed by Jason Aden
parent fc89479044
commit 831e71ea3c
11 changed files with 446 additions and 77 deletions

View File

@ -141,6 +141,14 @@ export interface DirectiveDef<T, Selector extends string> extends BaseDef<T> {
/** Refreshes content queries associated with directives in a given view */
contentQueriesRefresh: ((directiveIndex: number, queryIndex: number) => void)|null;
/**
* The number of host bindings (including pure fn bindings) in this directive/component.
*
* Used to calculate the length of the LViewData array for the *parent* component
* of this directive/component.
*/
hostVars: number;
/** Refreshes host bindings on the associated directive. */
hostBindings: ((directiveIndex: number, elementIndex: number) => void)|null;

View File

@ -289,6 +289,13 @@ export interface TView {
*/
bindingStartIndex: number;
/**
* The index at which the data array begins to store host bindings for components
* or directives in its template. Saving this value ensures that we can set the
* binding root and binding index correctly before checking host bindings.
*/
hostBindingStartIndex: number;
/**
* Index of the host node of the first LView or LContainer beneath this LView in
* the hierarchy.