feat(core): view engine - add WrappedValue support (#14216)

Part of #14013
This commit is contained in:
Tobias Bosch
2017-01-31 11:08:29 -08:00
committed by Miško Hevery
parent 1bc5368ea0
commit 08ff67ea11
9 changed files with 327 additions and 104 deletions

View File

@ -7,7 +7,7 @@
*/
import {isDevMode} from '../application_ref';
import {devModeEqual} from '../change_detection/change_detection';
import {WrappedValue, devModeEqual} from '../change_detection/change_detection';
import {SimpleChange} from '../change_detection/change_detection_util';
import {looseIdentical} from '../facade/lang';
import {Renderer} from '../render/api';
@ -63,6 +63,13 @@ export function checkAndUpdateBindingWithChange(
return null;
}
export function unwrapValue(value: any): any {
if (value instanceof WrappedValue) {
value = value.wrapped;
}
return value;
}
export function declaredViewContainer(view: ViewData): ElementData {
if (view.parent) {
const parentView = view.parent;