Pass invisible or hidden parameters using routerLink Angular

后端 未结 7 485
清酒与你
清酒与你 2020-12-03 10:48

I have router link like below:

I want t

7条回答
  •  隐瞒了意图╮
    2020-12-03 11:18

    The response isn't exactly efficient because the skipLocationChange don't change the current route on browser url and if you want to go back later, you backed from the first route.

    For example if you were on home page and use this:

    if you want to back from dashboard to home you can't do that with object location, in this case, you need to use Router and specify an exactly route (/dashboard).

    But this in much cases this is a bad solution, and the browser routing don't change from /home to dashboard.

    Inconvenients:

    • The browser don't refresh to the correct url
    • You can't go back from dashboard (current route)

    You can create the data service or check the official angular router docs

提交回复
热议问题