How can I pass arguments to init() or access the arguments passed to create() inside init() in ember.js
init()
create()
Just use this.get('theProperty')
this.get('theProperty')
Example:
var data = { foo: "hello", }; var MyModel = Em.Object.extend({ init: function() { this._super(); var foo = this.get('foo'); alert(foo); } }); MyModel.create(data);