Created
August 18, 2013 02:09
-
-
Save hashg/6259588 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app/routes.js | |
function Routes() { | |
this.resource('register', {path: '/register'}); | |
this.resource('login', {path: '/login'}); | |
this.resource('logout', {path: '/logout'}); | |
this.resource('projects', {path: '/projects'}); | |
this.resource('projectsNew', {path: '/projects/new'}); | |
this.resource('project', {path: '/projects/:project_id'}); | |
this.resource('projectEdit', {path: '/projects/:project_id/edit'}); | |
this.resource('persons', {path: '/persons'}); | |
// this.resource('personsNew', {path: '/persons/new'}); - Register will take of it. | |
this.resource('person', {path: '/persons/:person_id'}); | |
this.resource('personEdit', {path: '/persons/:person_id/edit'}); | |
this.resource('vacations', {path: '/persons/:person_id/vacations'}); | |
this.resource('vacationsNew', {path: '/persons/:person_id/vacations/new'}); | |
this.resource('vacation', {path: '/persons/:person_id/vacations/:vacation_id'}); | |
this.resource('vacationEdit', {path: '/persons/:person_id/vacations/:vacation_id/edit'}); | |
} | |
export default Routes; | |
app/app.js | |
import Resolver from 'resolver'; | |
var App = Ember.Application.create({ | |
rootElement: '#ember-app', | |
LOG_ACTIVE_GENERATION: true, | |
LOG_VIEW_LOOKUPS: true, | |
modulePrefix: 'appkit', // TODO: loaded via config | |
resolver: Resolver | |
}); | |
import routes from 'appkit/routes'; | |
App.Router.map(routes); // TODO: just resolve the router | |
export default App; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment