Skip to content

Instantly share code, notes, and snippets.

@eibrahim
Created September 13, 2016 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eibrahim/45996d5c39f2c352d907911c5561b953 to your computer and use it in GitHub Desktop.
Save eibrahim/45996d5c39f2c352d907911c5561b953 to your computer and use it in GitHub Desktop.
router for taskorami
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