mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +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);
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user