Created
September 13, 2016 17:15
-
-
Save eibrahim/45996d5c39f2c352d907911c5561b953 to your computer and use it in GitHub Desktop.
router for taskorami
This file contains hidden or 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
import Ember from 'ember'; | |
import config from './config/environment'; | |
var Router = Ember.Router.extend({ | |
location: config.locationType | |
}); | |
Router.map(function() { | |
this.resource('master', {path: '/'}, function() { | |
this.resource('projects', function() { | |
this.resource('project', {path: ':project_id'}, function(){ | |
this.route('task', {path: '/tasks/:task_id'}); | |
this.route('edit'); | |
}); | |
}); | |
this.resource('contexts', function() { | |
this.resource('context', {path: ':context_id'}, function() { | |
this.route('task', {path: '/tasks/:task_id'}); | |
this.route('edit'); | |
}); | |
}); | |
this.resource('review', function() { | |
this.resource('review.project', {path: ':project_id'}, function() { | |
this.route('task', {path: '/tasks/:task_id'}); | |
}); | |
}); | |
this.resource('master.today',{path:'today'}, function() { | |
this.route('task', {path: '/tasks/:task_id'}); | |
}); | |
this.resource('settings', function() { | |
this.route('omnifocus'); | |
this.route('changePassword'); | |
this.route('email-address'); | |
}); | |
this.route('me'); | |
this.route('changePassword'); | |
this.route('trash'); | |
this.route('taskNew', {path: 'tasks/new'}); | |
this.route('inbox'); | |
}); | |
this.resource('user', { path: '/u' }, function(){ | |
this.route('login'); | |
this.route('logout'); | |
this.route('register'); | |
this.route('forgot'); | |
}); | |
}); | |
export default Router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment