I'm working on an app, and trying to figure out ember.
I have followed this: http://ember.guru/2014/master-your-modals-in-ember-js to getting my modals working, and I have no problem getting edit and delete to work, but I can't figure out how to get create working.
here is my link for edit:
<a {{action 'showModal' 'contact.addresses.modal' contactAdress}}><i class="pencil circular icon"></i></a>
and for create:
<div class="ui button small" {{action 'showModal' 'contact.addresses.new' ##WHAT TO PUT HERE##}}><i class="plus icon"></i> New Address</div>
my router for the section
this.resource('contact', {path: '/contact/:contact_id'}, function(){
this.route('personage', {path: '/'});
this.route('addresses');
...
the addresses is a belongs_to to contacts
Can someone please point me in the right direction, I have worked on this for days now!
UPDATE
route: contact.addresses.new
export default Ember.Route.extend({
setupController: function(controller) {
controller.set('fields', {})
}
});