角度-router.navigate('/ xxx')解析为'false'

时间:2018-11-01 14:48:26

标签: angular-ui-router angular5

this.router.navigate(navtoURL).then((isNavigationSuccessfull: boolean) => {
// isNavigationSuccessfull...
}).catch(err => {
    // handle error
});

我的“ router.navigate('/ xxx')”调用有时会以“ false”解析。这是随机发生的,似乎没有规律。它不会转到“捕获”方法。如果我重试导航,它似乎可以工作。该故障仅在第一次导航时随机发生。

在检查导航轨迹时,我发现“ NavigationCancel”事件被用空('')“原因”调用。

有人可以告诉我“导航”可以解决为“假”的情况吗?

0 个答案:

没有答案