我的angularJS ng模型在浏览器标签之间共享.如何预防 [英] My angularJS ng-model is shared across browser tabs. How to prevent that
问题描述
我的angularJS ng模型在浏览器选项卡之间共享.我想为每个选项卡维护一个单独的范围.我将数据存储在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 ,然后选择同步选项"并禁用除CodeSync之外的所有选项.
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模型在浏览器标签之间共享.如何预防的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!