mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 15:03:44 +08:00
14 lines
222 B
JavaScript
14 lines
222 B
JavaScript
export default class Routes {
|
|
routes = {};
|
|
|
|
add(name, path, component) {
|
|
this.routes[name] = { path, component };
|
|
|
|
return this;
|
|
}
|
|
|
|
extend(app, extension) {
|
|
Object.assign(app.routes, this.routes);
|
|
}
|
|
}
|