How do i render an element in a outlet in ember.js with different urls


#1

Say i have a posts page with a input field which gives me auto assist list of all post category, now when i select any one of the post i have to display a datatable of all post under the selected post category.

so for this already i have a route url /posts/:post_id/post which returns me with array of all post and also has controller and route associated with it. but the page i am in has url /post/edit now how can i load /posts/: post_id/post into /post/edit 's outlet.

if i register this.resource(‘postdt’,{path:’/posts/: post_id/post’}) not nested under any thing than search category text field goes off.

if i use route or resource nested inside path:’/post/edit’ then url goes out to be /post/edit/posts/ : post_id /post any idea, what is the solution for this.


#2

Dude, too many words. You gotta break this down in a way that someone can actually follow.

Make JSBin or just simplify what you’re trying to say cause I’m breaking my mind just trying to read your post.


#3

apologies for being too too descriptive. summary: how one can render different url based route inside outlet of one template.

well tried render with ‘into’ option works fine.


#4

please let me know is there any better way of doing this.


#5

It’s hard to understand what you want to do. Do you want to show the actual post on that posts editing page? Well, just make edit a partial. They do this in the Intro to Emberjs video in the guides on the website.

Something like this, no?:

Straight out of this video: