refactor(ivy): remove dependency on global state from isCreationMode (#31959)

PR Close #31959
This commit is contained in:
Pawel Kozlowski
2019-08-02 14:25:52 +02:00
committed by Alex Rickabaugh
parent 48a3741d5a
commit 9106271f2c
6 changed files with 17 additions and 17 deletions

View File

@ -158,6 +158,11 @@ export function readPatchedLView(target: any): LView|null {
return null;
}
/** Checks whether a given view is in creation mode */
export function isCreationMode(view: LView): boolean {
return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;
}
/**
* Returns a boolean for whether the view is attached to the change detection tree.
*