In your example, I’d just default the values:
App.MyComponent = Ember.Component.extend({
someFlag: "foo",
anotherFlag: "bar"
})
Assuming it’s more complex than that, handling it on init
should do the trick:
App.MyComponent = Ember.Component.extend({
setupFlags: function(){
this.setProperties({ // more logic here
someFlag: "foo",
anotherFlag: "bar"
});
}.on("init")
})
That’s basically the same as overriding init
but without the need to remember to call this._super()
hth