Change on ngModel reflecting on same ngModel of other browser angular2

182 views Asked by At



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:

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


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

1

There are 1 answers

0
yurzui On BEST ANSWER

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

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

enter image description here