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

前端 未结 5 2004
走了就别回头了
走了就别回头了 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:39

    you don't want to pay an object through a router. Instead pass an id and then re-look up the item on the new page. That way if you refresh the new page, everything still works.

提交回复
热议问题