Angular: no way to pass an object through a router?

前端 未结 5 2006
走了就别回头了
走了就别回头了 2021-01-26 09:17

I\'ve been trying to find a simple solution.

I have a for loop displaying a list of items. clicking on one of the items routes you to the detailed component and I just wa

5条回答
  •  失恋的感觉
    2021-01-26 09:51

    What i think about why there is no way to pass an object through a router is because if you pass the data and made it available on the route2,

    the data is available on the route2 just because it is passed from route1.

    What happens if you refresh route2??

    from where will you get the data for route2, your page would collapse.

提交回复
热议问题