0

这篇文章准确地解释了我想要做什么,但我正在寻找有关如何在 NativeScript 中做到这一点的帮助。

从历史堆栈中删除活动

[已解决]我在这里找到了答案:

https://github.com/NativeScript/nativescript-angular/blob/master/ng-sample/app/examples/router/clear-history-test.ts

4

1 回答 1

1

这是我使用 angular 和 nativescript 的代码解决方案:

// Sign In Page
import { RouterExtensions } from "nativescript-angular/router";

constructor(private _router: RouterExtensions) {}

private onSignInComplete(): void {
    this._router.navigate(["/mainPage"], { clearHistory: true });
}
于 2016-08-26T17:13:23.050 回答