2021-03-08 12:15:54 +00:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { action } from '@ember/object';
|
|
|
|
import { tracked } from '@glimmer/tracking';
|
|
|
|
|
|
|
|
export default class RouteComponent extends Component {
|
|
|
|
@service('routlet') routlet;
|
|
|
|
|
|
|
|
@tracked model;
|
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
get title() {
|
|
|
|
return this.args.title;
|
|
|
|
}
|
|
|
|
|
2021-03-08 12:15:54 +00:00
|
|
|
@action
|
|
|
|
connect() {
|
|
|
|
this.routlet.addRoute(this.args.name, this);
|
|
|
|
}
|
2021-04-06 12:40:40 +00:00
|
|
|
|
2021-03-08 12:15:54 +00:00
|
|
|
@action
|
|
|
|
disconnect() {
|
|
|
|
this.routlet.removeRoute(this.args.name, this);
|
|
|
|
}
|
|
|
|
}
|