refactor(tests): refactor tests to clarify the behavior of onChange
This commit is contained in:
8
modules/angular2/src/core/compiler/view.js
vendored
8
modules/angular2/src/core/compiler/view.js
vendored
@ -2,7 +2,7 @@ import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
import {Promise} from 'angular2/src/facade/async';
|
||||
import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection';
|
||||
import {AST, ContextWithVariableBindings, ChangeDispatcher, ProtoChangeDetector, ChangeDetector,
|
||||
ChangeRecord, BindingRecord} from 'angular2/change_detection';
|
||||
ChangeRecord, BindingRecord, uninitialized} from 'angular2/change_detection';
|
||||
|
||||
import {ProtoElementInjector, ElementInjector, PreBuiltObjects} from './element_injector';
|
||||
import {BindingPropagationConfig} from './binding_propagation_config';
|
||||
@ -682,7 +682,7 @@ class DirectiveMemento {
|
||||
}
|
||||
}
|
||||
|
||||
class PropertyUpdate {
|
||||
export class PropertyUpdate {
|
||||
currentValue;
|
||||
previousValue;
|
||||
|
||||
@ -690,4 +690,8 @@ class PropertyUpdate {
|
||||
this.currentValue = currentValue;
|
||||
this.previousValue = previousValue;
|
||||
}
|
||||
|
||||
static createWithoutPrevious(currentValue) {
|
||||
return new PropertyUpdate(currentValue, uninitialized);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user