2014-02-27 08:45:45 +04:00
|
|
|
/*global Ember */
|
2014-02-26 08:58:00 +04:00
|
|
|
|
2014-02-27 08:45:45 +04:00
|
|
|
// ensure we don't share routes between all Router instances
|
|
|
|
var Router = Ember.Router.extend();
|
|
|
|
|
2014-03-02 18:30:35 +04:00
|
|
|
Router.reopen({
|
|
|
|
//location: 'history', // use HTML5 History API instead of hash-tag based URLs
|
|
|
|
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
|
|
|
|
});
|
|
|
|
|
2014-02-27 08:45:45 +04:00
|
|
|
Router.map(function () {
|
2014-03-02 18:30:35 +04:00
|
|
|
this.resource('posts', { path: '/' }, function () {
|
|
|
|
this.resource('post', { path: '/:post_id' });
|
|
|
|
});
|
|
|
|
this.resource('editor', { path: '/editor/:post_id' });
|
|
|
|
this.route('new', { path: '/editor' });
|
2014-02-26 08:58:00 +04:00
|
|
|
});
|
2014-02-27 08:45:45 +04:00
|
|
|
|
|
|
|
export default Router;
|