mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] router: change Destination shape
This commit is contained in:
@@ -18,8 +18,8 @@ export interface RouterEnv extends Env {
|
||||
}
|
||||
|
||||
export interface Destination {
|
||||
to?: string;
|
||||
route?: string;
|
||||
path?: string;
|
||||
name?: string;
|
||||
params?: RouteParams;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class Router {
|
||||
}
|
||||
|
||||
destToUrl(dest: Destination): string {
|
||||
return dest.to || this.routeToURL(this.routes[dest.route!].path, dest.params!);
|
||||
return dest.path || this.routeToURL(this.routes[dest.name!].path, dest.params!);
|
||||
}
|
||||
|
||||
get currentRouteName(): string | null{
|
||||
|
||||
Reference in New Issue
Block a user