Search code examples
node.jsangularjshttpserver

AngularJS - When updating the code, it doesn't reflect on side


When I update my code, and refresh the page, my server doesn't reflect the changes! It is still loading the old file? (this is running locally). I really don't understand why!

What I mean is that say I make a mistake, or decide to change a line of code. I fix the mistake, or change the line of code. But when I refresh the page, it is as though I have not done so. The mistake or the line of old code still remains behind and that code is ran!

Why?! I am using node's http-server to run my server on a Mac.


Solution

  • Angular sometimes comes with minimizing tools. If this is the case, you have to build your app using these tools to regenerate the files your browser should load.

    If not, then probably it is a simple caching issue and you should clear your browser's caches.