feat(ivy): enhance [style] and [class] bindings to be animation aware (#26096)

PR Close #26096
This commit is contained in:
Matias Niemelä
2018-10-03 14:09:59 -07:00
committed by Misko Hevery
parent be337a2e52
commit fa8e633be5
19 changed files with 2045 additions and 439 deletions

View File

@ -74,9 +74,9 @@ export function getHostComponent<T = {}>(target: {}): T|null {
* Returns the `RootContext` instance that is associated with
* the application where the target is situated.
*/
export function getRootContext(target: {}): RootContext {
const context = loadContext(target) !;
const rootLViewData = getRootView(context.lViewData);
export function getRootContext(target: LViewData | {}): RootContext {
const lViewData = Array.isArray(target) ? target : loadContext(target) !.lViewData;
const rootLViewData = getRootView(lViewData);
return rootLViewData[CONTEXT] as RootContext;
}