Reputation: 6312
In Polymer.dart I'm aware that there are no strictly observable getters, and that instead we need to use bindProperty()
(Soon to be onPropertyChange()
) and notifyProperty()
to simulate the same thing.
Looking through various code samples, I see some locations where this is added in to the constructor of the PolymerElement's class, and others where the binding happens in the created()
method. Is there a preference as to where binding should occur? Are there any significant benefits or detriments on putting them in one of these areas or another?
Upvotes: 3
Views: 433
Reputation: 120799
Putting bindProperty
into the constructor no longer works in polymer.dart >= 0.8. I am in the process of changing all my samples.
I am now using created
as the location where I put my onPropertyChange
or similar calls.
Upvotes: 1