How to get the observes('x').on('init') without prototype extensions?


#1

What is the idiomatic way to write

myObserver: function() {
// Some stuff here
}.observes('x').on('init')

without function prototypes?


#2

Hello, try this one:

myObserver: Ember.on('init', Ember.observer('x', function () {
    // Some stuff here
}))

#3

Thank you, @od1n, I have similar code but I thought there might be some nicer way. Guess we’ll need to wait for the decorator implementation :smile:

Thank you!