mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Add an additional notification for propChange event (required for angular2).
This commit is contained in:
@ -364,6 +364,17 @@ export class DependencyObservable extends observable.Observable {
|
|||||||
var changeData = super._createPropertyChangeData(property.name, newValue);
|
var changeData = super._createPropertyChangeData(property.name, newValue);
|
||||||
this.notify(changeData);
|
this.notify(changeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let eventName = property.name + "Change";
|
||||||
|
if (this.hasListeners(eventName)) {
|
||||||
|
var ngChangedData = {
|
||||||
|
eventName: eventName,
|
||||||
|
propertyName: property.name,
|
||||||
|
object: this,
|
||||||
|
value: newValue
|
||||||
|
}
|
||||||
|
this.notify(ngChangedData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _eachSetProperty(callback: (property: Property) => boolean) {
|
public _eachSetProperty(callback: (property: Property) => boolean) {
|
||||||
|
Reference in New Issue
Block a user