Ember generate nested route

Hello,

The ember guide : nested routes say that when “ember generate route posts/new” in the console, the files “templates/posts.hbs” and “templates/posts/new.hbs” should be created

but when I try it, only “templates/posts/new.hbs” is created it is normal ?

Yep, it is normal… but you right, you need {{outlet}} in templates/posts.hbs to see something with the nested templates/posts/new.hbs

So you have to run ember g route posts first and after ember g route posts/new

You can see a few examples here in this tutorial also: Ember.js Octane Tutorial - From beginner to advance - yoember.com

ok, thank you ! I didn’t understoud

The ember guide is not very clear at this point, as it is explain it seems that the posts.hbs is already created when “ember generate route posts/new”

1 Like

@pat123456 would love to get an issue or a PR on what was concerning you here. The guides are ours jointly to make run smoothly, so if you hit snags do let us know! :slight_smile:

1 Like

I troll myself with that sometimes. I know how it works, but I still get hazy and expect ember g route cats/dog/edit to create all of those routes once in a while.

Hi acorncom,

Thank you for your interest in my question ! I did open an issue : https://github.com/emberjs/guides/issues/1703

Bye