getoutreach / epf

A framework for keeping your Ember.js apps in sync.
http://epf.io
MIT License
369 stars 33 forks source link

defaultValue: broken or not implemented? #75

Open lastobelus opened 11 years ago

lastobelus commented 11 years ago
App.Widget = Ep.Model.extend({
  x: Ep.attr('number', { defaultValue: 100 }),
});

var w = App.Widget.create();
w.get('x');
=> undefined
biscuitvile commented 11 years ago

As far as I can tell this is currently not implemented. I'm interested too. In the meantime you can use the model's didCreate hook to set default values.

ghempton commented 10 years ago

This is currently not implemented. I am planning on supporting partially loaded models soon which conflicts with this a little. Need to think it through.