[英]How to Pass ID one page to another page using Angular?
My question is, do I want to pass the id from one page to another page?我的问题是,我想将 id 从一页传递到另一页吗? without using Routing and local storage.
不使用路由和本地存储。 if we stored in the service file, once refresh the page.
如果我们存储在服务文件中,一旦刷新页面。 it is collapsed, so, please tell me the possible ways.
它被折叠了,所以,请告诉我可能的方法。
Thanks谢谢
There are many ways by which you can have state management and share your state across different components您可以通过多种方式管理 state 并在不同组件之间共享您的 state
But all this ways will lose the data when you reload the page, so to handle that situation you have to take additional steps但是当您重新加载页面时,所有这些方式都会丢失数据,因此要处理这种情况,您必须采取额外的步骤
You can also leverage your backend for storing data based on your application requirements您还可以根据应用程序要求利用后端存储数据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.