I want to give a parameter to an url in Ember.js and extract this parameter in the route index.js.
And then in index.js I do this:
model( params ) {
console.log( params.edition_id );
return "something";
}
Router.js file:
Router.map( function( ) {
this.route( '/index' );
this.route( '/', {
path: '/:edition_id'
} );
} );
This gives me the following error:
Error while processing route: / Ember Data Request GET undefined returned a 404 Payload (text/html; charset=utf-8) Cannot GET /7698 Error: Ember Data Request GET undefined returned a 404 Payload (text/html; charset=utf-8) Cannot GET /7698
However I don't want ember-data interfering with this, I simply need the parameter in my app logic, without any models or such.
Aucun commentaire:
Enregistrer un commentaire