aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/router.js
blob: 7b8df6395f23c106a687c995c91ebcc72c070cd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Ember from 'ember';
import config from './config/environment';

var Router = Ember.Router.extend({
  location: config.locationType
});

Router.map(function() {
  this.route('packages',{path:''});
  this.route('search',{path:'/search/:query'});
  this.route('package', {path:'/package/:packageId'}, function() {
    this.route('show',function() {
      this.route('file', {path:'*filePath'}, function() {
      });
    });
    this.route('search',{path:'/search/:query'});
  });
  this.route('bad-url', { path: '/*badurl' });
});

export default Router;