How to skip a page in browser history when navigating back?

陌路散爱 提交于 2019-12-05 10:41:49

When navigating from B to C one has to set { replaceUrl: true }:

this.router.navigate(["/c"], { replaceUrl: true });

This replaces the page B by C in the browser history.

Quick and easy solution is

Use navigation in your typescript instead of html file .

And specify the parameter

{ skipLocationChange: true }

Proper solution is to write your own navigation strategy and specify in app.modules.ts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!