I have this code:
this.resource('vervacante', function () {
this.resource('vervacante', { path: "/:title" });
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return Ember.$.getJSON("vacantes.json");
/*
[ {
"title": "first" ...
},
"title" "second" ...
} ]
*/
}
});
App.VervacanteRoute = App.IndexRoute.extend({
model: function(params) {
console.log(params.title);
}
});
Linking and showing the model works fine, and I get the param of the URL after a refresh, but without the model.
My url is like ‘index.html/vervacante/title’.
I have read ‘defining your routes’, but seems to be for Ember Data.
I am stuck at this point, can someone help me?