Quantcast
Viewing all articles
Browse latest Browse all 4829

Child route not hitting rails

@Chitra wrote:

Hi All,

I am trying to render Issue's children. Ember route changed in browser URL, but it didn't hit the Rails API.

My URL looks like this:
/issues/:id/issues

Show.hbs File

{{#link-to "issues.show.issues" model.id}}
{{#tablist.tab "TabB" on-click=(action (mut selection))}}

{{/tablist.tab}}
{{/link-to}}

router.js

this.route('issues', function() {
this.route('index', { path: '/' });
this.route('show', { path: '/:issueId' }, function(){
this.route('issues');
});
});

routes/issues/show/issues.js

import BaseRoute from '../../base-route';

export default BaseRoute.extend({
model(params) {
let issue = this.modelFor('issues/issue', params.issueId);
return issue.get('issues');
}
});

No errors found in frontend and backend.

Ember version: ember-cli: 2.12.1

Appreciate your inputs here.

Thanks.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles