I’ve been a backend developer for many years (mostly with Rails) and I want to take a shot at front-end application development with Ember.
I want to build an app with a very simple form (3 fields) to create records in the local storage database. The code is on GitHub
I’ve got the base UI figured out but I don’t understand how to wire my form with EmberData to store the values in the database (reading pre-stored data is OK though).
I’ve read most of the official guides but I didn’t find anything related to object creation via forms. I’ve also looked at the TodoMVC app, but it is a single field input and I could figure out how to expand this to a more complex object.
Any help or pointer to interesting resources would be great. Thanks.
export default Ember.ObjectController.extend({
actions: {
save: function() {
var account = this.get('model');
account.save().then(successFn, failureFn);
// You need to implement successFn and FailureFn
}
}
});