I've started learning Emberjs and i'have an error but have not found the problem :
In my view named new.hbs have this :
{{input value=name type="text" placeholder="Event name" size="50"}}
<button type="submit" {{action "create"}}>Done</button>
In my model event.js have this :
Kiksoo.Event = DS.Model.extend({
name: DS.attr( 'string' ),
});
And in eventController.js have this :
App.EventsNewController = Ember.ObjectController.extend({
actions: {
create: function(){
alert(this.get('model'));
var newEvent = this.store.createRecord('event', this.get('model'));
newEvent.save();
}
}
});
But have the error :
Uncaught Error: Assertion Failed: Cannot delegate set('name', s) to the 'content' property of object proxy : its 'content' is undefined.
Thank's