Directory structure for nested routes


#1

I am having trouble creating correct directory structure for an ember app created using ember-cli. So, I want to use ember generate to help me. I know following

ember g resource service_provider

will create following in Router.js

Router.map( function() {
  this.resource( 'service_provider', { path: 'service_providers/:service_provider_id' } );

Can I create following Router.js

this.resource('service_provider', function () {
  this.route( 'home' );
  this.resource( 'account_settings', function() {
         this.route( 'password' );
  } );
  this.resource('service_provider.invitations', {path: '/invitations' },function(){
    this.route('new');
  } );
  this.resource('inventory', function () {
  this.resource('item', { path: 'item_id' });
  } );

using

ember g resource resource_name

ember g route route_name