framework/ember/app/router.js

24 lines
561 B
JavaScript
Raw Normal View History

2014-12-20 16:56:46 +10:30
import Ember from 'ember';
import config from './config/environment';
2014-12-20 16:56:46 +10:30
console.log(config.locationType);
2014-12-20 16:56:46 +10:30
var Router = Ember.Router.extend({
location: config.locationType
2014-12-20 16:56:46 +10:30
});
Router.map(function() {
this.resource('categories', { path: '/categories' });
2014-12-20 16:56:46 +10:30
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;