My backed has a list of objects, at api/vehicles:
{
"vehicles" : [
{
"id" : "car" ,
"nr-doors" : 4,
...
},
{
"id" : "ship",
"nr-sails" : 3
...
},
{
"id" : "train",
"seats-per-wagon" : 30,
...
}
]
}
All vehicles have only the "id" field in common, and they have several specific properties. There is only one vehicle of each kind. The IDs are fixed and already known. I would like to have a template to display/edit the car's properties. How can I relate a specific id (like "car") with a model/template/controller/view?
The problem that I have is that in ember and ember-data, the IDs at a certain URL refer to objects of the same kind, which can be handled by the same route/view/controller/model. In my application, this is not the case: each ID must be handled in a completely different controller/model/view/template.
How can I do this?