I have two routes defined in different JS-documents, although both are included into the same HTML-file. Route 1 looks like this:
Router = can.Control({
"invoices/:id route": function(data){
//load an invoice by id
}
});
And the other one like this:
Router = can.Control({
"receipts/:id route": function(data){
//load a receipt by id
}
});
When i browse to #!receipts/1 both Receipts and Invoices are being instantiated. Why is that and how can I fix it?