mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
5335fb8fba
part of #194
19 lines
492 B
TypeScript
19 lines
492 B
TypeScript
import { Component } from "../component/component";
|
|
import { xml } from "../tags";
|
|
|
|
export class RouteComponent extends Component<any, {}> {
|
|
static template = xml`
|
|
<t>
|
|
<t
|
|
t-if="routeComponent"
|
|
t-component="routeComponent"
|
|
t-key="env.router.currentRouteName"
|
|
t-props="env.router.currentParams" />
|
|
</t>
|
|
`;
|
|
|
|
get routeComponent(): any {
|
|
return this.env.router.currentRoute && this.env.router.currentRoute.component;
|
|
}
|
|
}
|