framework/ember/app/router.js
Toby Zerner 690174297d Rejigging templates for redesign.
- Componentize more stuff, heading in the direction of Ember 2.0
- Start CSS from scratch
- Everything is broken atm!
2015-01-01 20:08:38 +10:30

24 lines
561 B
JavaScript

import Ember from 'ember';
import config from './config/environment';
console.log(config.locationType);
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.resource('categories', { path: '/categories' });
this.resource('discussions', { path: '/' }, function() {
this.resource('discussion', { path: '/:id/:slug' });
});
this.resource('user', { path: '/user/:username' }, function() {
this.route('activity');
this.route('posts');
this.route('preferences');
});
});
export default Router;