Hello,
I want to load different (unrelated) data (e.g. order and users ) into modal dialog ? Could you explain or suggest me the best way of doing this ? Currently I have such a piece of code (I don’t use ember-data, I use $.getJSON for getting data):
App.ApplicationRoute = Ember.Route.extend({
actions: {
...
openModal: function(modalName, model) {
this.controllerFor(modalName).set('model', model);
return this.render(modalName, {
into: 'application',
outlet: 'modal',
view: 'modal'
});
},
openMyModalDialog: function(order) {
**how to load additional data for model e.g. users **
var model = { order: order, user: ? }
this.send('openModal', 'myModalName', model);
},
...
myModalDialog.hbs have action:
{{action 'openMyModalDialog' order}}
Thanks in advance.