I'm very new to Ember.
Im having trouble with this dynamic url feature in nested routes.
I understand nesting routes in general like:
App.Router.map(function(), {
this.resource('orders', function(){
this.route('order', { path: "/orders/:order_id" })
})
})
I'm know to put {{ outlet }}
inside orders
template to display the nested order
object.
But my question is, how does the naming convention of :order_id work in relation to my model data?
If my orders data is :
{
id: 1,
name: "John Doe",
address: "123 example rd",
telephone: "5145555555"
}
Does this :order_id work similar to rails in that it prepends the object name ":order_" to the JSON attribute of "id"?
Im pretty sure that's the case, but im not sure what else I'm missing to display a specific object when i visit the path: "/orders/1"
Probably an Ember.ObjectController
somewhere, but I cant quite figure it out.