我的 angularJS ng-model 在浏览器选项卡之间共享.如何防止 [英] My angularJS ng-model is shared across browser tabs. How to prevent that

查看:24
本文介绍了我的 angularJS ng-model 在浏览器选项卡之间共享.如何防止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 angularJS ng-model 在浏览器选项卡之间共享.我想为每个选项卡维护一个单独的范围.我正在 SessionStorage 中存储数据.我对 SessionStorage 没有任何问题,但是具有观察者的 ng-model 在浏览器选项卡之间共享.如何预防?

My angularJS ng-model is shared across browser tabs. I want to maintain a separate scope for each tab. I am storing data in SessionStorage.I dont have any issues with SessionStorage but ng-model which is having watcher, is shared across browser tabs. How to prevent that?

推荐答案

这很简单,有隐藏选项!当您的应用程序开始在 http://Localhost:3000 运行时,另一个应用程序从 http://localhost:3001.在此应用程序中有一些可以更改的配置,例如,同步选项.您必须导航到 http://localhost:3001,然后选择同步选项并禁用除 C​​odeSync 之外的所有选项.

That is easy, there are hide options for it! When your application starts to run at http://Localhost:3000, an other application start at http://localhost:3001. In this application there are some configuration that can be change, for example, Sync Options. You must navigate to http://localhost:3001 then select Sync Option and disable all option but CodeSync.

这篇关于我的 angularJS ng-model 在浏览器选项卡之间共享.如何防止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆