Dynamically change components but have same url di

2019-02-21 02:27发布

I have a router outlet that would toggle between various components like table, chart, list etc.

I have a requirement to not show url change on the address bar.

Suppose if table path is http://mysite/table and chart is http://mysite/chart, it should always show http://mysite without displaying relative path change.

I think it doesn't make sense to have same url but wants to use a router outlet. Looking for any ideas to achieve that using angular to change components. (even without router is okay)

1条回答
聊天终结者
2楼-- · 2019-02-21 03:09

Use skipLocationChange as described here https://angular.io/api/router/NavigationExtras

查看更多
登录 后发表回答