I'm using angularjs,when I modify the page content . It will not take effect in browser,But when I close browser and open it again. It works again .how you develop with angularjs .can anbody share solution? thx!
Asked
Active
Viewed 79 times
1
-
It's probably being cached, if you're using chrome you can go in the settings and tell it to clear the cache when the console is open. Or have the console open, right click the refresh button and do Empty Cache and Hard Reload. – tymeJV Oct 28 '14 at 04:25
-
Possible duplicate of [angularjs code changes do not show up after browser refresh](http://stackoverflow.com/questions/28311542/angularjs-code-changes-do-not-show-up-after-browser-refresh) – Samuel Jun 07 '16 at 15:24
2 Answers
0
Try pressing Ctrl + R
or F5
which will do a refresh of the page and should solve your problem.

Sazid
- 2,747
- 1
- 22
- 34
0
Sounds like the dreaded $templateCache is persisting stale code. In your app.js run method try this, however I have noticed that some bower modules that use $templateCache will error out:
$rootScope.$on('$routeChangeStart', function(event, next, current) {
if (typeof(current) !== 'undefined'){
$templateCache.remove(current.templateUrl);
}
});

Coldstar
- 1,324
- 1
- 12
- 32