Messerschmitt
Messerschmitt

Reputation: 335

Angular 2 code not updating in browser

I have a tricky problem. I have an express/angular2 app and my code isn't upadating when I reload the page in my browser. Express code is updating fine (I use nodemon), and html pages in angular2 too but my components and services don't update at all, I can delete all the components code and it will still run, what am I doing wrong here ? It used to work but now don't know why, it's not. Any ideas ? Thanks

Upvotes: 2

Views: 698

Answers (2)

Messerschmitt
Messerschmitt

Reputation: 335

It's all my fault, I forgot to run npm run tsc:w on the client side, my bad.

Upvotes: 0

Mario Petrovic
Mario Petrovic

Reputation: 8332

If you are not getting new code from your server, it might be caching. To prevent this you can Disable cache from Network tab in Developer tool:

enter image description here

The other thing you can try is to use a Hard reload or Empty Cache and Hard Reload options from refresh icon dropdown. This dropdown is available when you right click on refresh icon while Developer tool is openned:

enter image description here

Upvotes: 1

Related Questions