反映其他浏览器angular2的相同ngModel的ngModel更改 [英] Change on ngModel reflecting on same ngModel of other browser angular2

查看:104
本文介绍了反映其他浏览器angular2的相同ngModel的ngModel更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是Angle 2的新手,并在其上创建了一个项目.我正在使用npm运行angular 2应用程序.当前,我在具有3000端口的localhost上托管应用程序.

我的项目中的问题是,当我同时在两个不同的浏览器上访问同一页面时,例如crome和firefox.当我在一个浏览器上输入内容时,另一浏览器也在该输入内容上反映了相同的文本.甚至输入类型的密码也反映出相同的情况.请帮助我知道:



I am new to angular 2 and creating a project on it. I am using npm to run angular 2 application. Currently, I am hosting application on localhost with 3000 port.

Problem in my project is that when I am visiting same page simultaneously on two different browser say crome and firefox. When I am typing on input on one browser, The other browser also reflecting same text on that input. Even input type password also reflecting same.

I checked in console and it is showing nothing and searched on web but not found any thing near to this problem. Please help me to know:

为什么不同的浏览器在相同的ngModel上反映相同的文本以及如何解决?

why different browser reflecting same text on same ngModel and how to fix it?


我在下面粘贴了gif图片,以显示问题出在哪里.


Below I pasted gif image to show how things are going wrong.

推荐答案

我假定您使用Browsersync. lite-server在内部也使用此扩展. 这是Browsersync的功能.

I assume you use Browsersync. lite-server also uses this extention internally. It is a functionality from Browsersync.

因此,为避免发生这种情况,您可以打开 http://localhost:3001 并关闭输入的同步选项:

So to avoid this behavior you can open http://localhost:3001 and switch off synchronization option for inputs:

这篇关于反映其他浏览器angular2的相同ngModel的ngModel更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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