mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
@ -89,6 +89,9 @@ export class Router {
|
|||||||
/** Navigate to the specified URL */
|
/** Navigate to the specified URL */
|
||||||
@Method()
|
@Method()
|
||||||
push(url: string, direction: RouterDirection = 'forward') {
|
push(url: string, direction: RouterDirection = 'forward') {
|
||||||
|
if (url.startsWith('.')) {
|
||||||
|
url = (new URL(url, window.location.href)).pathname;
|
||||||
|
}
|
||||||
console.debug('[ion-router] URL pushed -> updating nav', url, direction);
|
console.debug('[ion-router] URL pushed -> updating nav', url, direction);
|
||||||
|
|
||||||
const path = parsePath(url);
|
const path = parsePath(url);
|
||||||
|
Reference in New Issue
Block a user