ga-wdi-boston / ember-routing

Routing to standard and nested Templates.
Other
0 stars 110 forks source link

Templates should be generated before the routes are created #27

Open MicFin opened 7 years ago

MicFin commented 7 years ago

@raq929 suggests that the templates should be generated before the routes are created to stay consistent.

One example of the route being written first is https://github.com/MicFin/ember-routing#code-along-nested-templates

Router.map(function() {
  this.route('about');
  this.route('contact');
  this.route('team', function(){
    this.route('engineering');
    this.route('leadership');
  });
});

Next, we need to set up our Templates. The appropriate syntax to use in the generator is ember g template team/something - this will let ember-cli know to create a app/templates/team and a something.hbs file inside that directory.

Please review the other examples as well.