Answer the question
In order to leave comments, you need to log in
Why does an error occur when navigating from a nested route to another element of this route?
There is a /property/show.js route
import Ember from 'ember';
const {inject} = Ember;
export default Ember.Route.extend({
model(params) {
let store = this.get('store');
let p = store.findRecord('property', params.property_id, {reload: true});
return p;
},
actions: {
reloadModel: function () {
this.refresh();
},
back: function (type) {
this.transitionTo('property/' + type);
},
}
});
Answer the question
In order to leave comments, you need to log in
Found the reason. In my case, the problem is ember-cli-slick, which breaks js. Why and what to do is not yet clear.
similar.id is everything ok?
Check the variable in the template:
{{log similar.id}}
{{#link-to 'property.show' similar.id}}
{{similar.id}}
{{/link-to}}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question