javascript - 在( Angular 6)中的不同域之间共享 LocalStorage/SessionStorage

标签 javascript node.js angular

在 Angular 6 中,当我将数据存储在本地存储 (localhost:4200) 中,但是当我们可以运行像 (abc.localhost:4200) 这样的子域时,数据会在本地存储中删除,请帮我解决这个问题

最佳答案

您可以使用Cross StorageCross DomainStorage npms

关于javascript - 在( Angular 6)中的不同域之间共享 LocalStorage/SessionStorage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56765733/

相关文章:

javascript - 使用 jQuery 获取期权值(value)并应用折扣?

javascript - 错误 : File to import not found or unreadable: ~bootstrap/scss/bootstrap

javascript - 响应式(Reactive)形式的 Angular2 通用异步验证器

javascript - 如何将一个对象分成更小的对象

javascript - 类型错误 : Cannot read property '_attributes' of undefined after update

javascript - Grunt 组合媒体查询 - 无法调用未定义的方法 "join"

javascript - Angular 2 ngModel 不工作(仅限 javascript)

javascript - 自定义 Angular 6 Material 日期选择器

javascript - 如果另一个不存在,如何删除类

node.js - Express Http 请求超时