-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathrouter.js
More file actions
65 lines (53 loc) · 1.64 KB
/
Copy pathrouter.js
File metadata and controls
65 lines (53 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import EmberRouter from '@ember/routing/router';
import config from 'ember-api-docs/config/environment';
import { withHashSupport } from 'ember-api-docs/utils/url-hash-polyfill';
// The following adds support for URL hash routing for those URLs not prerendered
@withHashSupport
class AppRouter extends EmberRouter {
location = config.locationType;
rootURL = config.routerRootURL;
}
AppRouter.map(function () {
this.route('ember-cli');
this.route('project', { path: '/:project' });
this.route(
'project-version',
{ path: '/:project/:project_version' },
function () {
this.route('classes', function () {
this.route('class', { path: '/:class' });
});
this.route('functions', function () {
this.route('function', { path: '/:module/:fn' });
});
// Namespace routes
this.route('namespaces', function () {
this.route('namespace', { path: '/:namespace' });
});
// Module routes
this.route('modules', function () {
this.route('module', { path: '/:module' });
});
},
);
this.route('class', { path: '/classes/:class' });
this.route('module', { path: '/modules/:module' });
this.route('data-class', { path: '/data/classes/:class' });
this.route('data-module', { path: '/data/modules/:module' });
this.route('not-found', { path: '/*' });
});
/*
404
ember-cli
project
OTHER STATES
private, deprecated, inherited, protected
inherited is not reflected in URL state but it's checked by default
MAYBE REDIRECTS
/data/modules/:module
/data/classes/:class
/modules/:module
/classes/:class
See _redirects for netlify redirects
*/
export default AppRouter;