我有一个食谱建设者CRUD类型的应用程序。主窗口显示用户当前菜谱,用户可以单击“添加配料”按钮,并按他喜欢的方式编辑他的菜谱。
使用localStorage,我实现了页面刷新的持久性,并且一切都很完美。
成分选择成分:
// This code below is for choosing a single ingredient. useEffect runs when I add, remove or update ingredient.
useEffect(() => {
// more code here
localStorage.setItem("re
所以在我的角1.5应用程序中,我也想在页面加载中保留数据,
所以我正在使用$window.localStorage。
我正在阅读localStorage的一些价值,它在隐名模式下也能正常工作。
The page refreshes and yet the values are retained。
if($window.localStorage.selectedServers !== undefined)
selectedObj = JSON.parse($window.localStorage.selectedServers);
问题是
当我复制Url并隐匿在一个新的选项卡中打开时,