February 2016
Beginner to intermediate
308 pages
5h 46m
English
Another job of the route handler is rendering the appropriate template. Here is a recipe that goes over this.
In this recipe, we'll create a few nested routes and check where they get rendered.
students and schools route:$ ember g route schools $ ember g route schools/students
This will create the nested students and schools route.
router.js file:// app/router.js
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('schools', {}, function() {
this.route('students', {});
});
});
export default Router;The generated command already ...
Read now
Unlock full access