Skip to content

Commit

Permalink
fix(events): remove initial polymer property event
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This allows Angular to set intial property values, which is more natural for when the decorator is used. It does mean that undefined decorated properties may remain undefined even if their Polymer counterpart has a value. The solution is to always set an initial value in Angular for @PolymerProperty properties.
  • Loading branch information
hotforfeature committed Apr 11, 2017
1 parent 2f3f6a0 commit fa69915
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/events/polymer.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ export class PolymerDirective implements OnInit {
detail: event.detail
}));
});

// Fire an initial event to set the properties to their correct starting value
this.elementRef.nativeElement.dispatchEvent(new CustomEvent(`${property}Change`, {
detail: {
value: this.elementRef.nativeElement[property]
}
}));
});
}
}
Expand Down

0 comments on commit fa69915

Please sign in to comment.