I am developing an angular app. Whenever I modify the index.html, a request to localhost:8000 doesn't get the updated index.html. Why is that? I am using nodejs to host the server. I have tripped over this too many times assuming the request would get the updated index.html, such as including a new script but nothing happens because the index.html isn't the updated one. It is quite annoying every time I refresh I have to type index.html.
app.config(['$locationProvider', '$routeProvider', function ($locationProvider, $routeProvider) {
$locationProvider.html5Mode(true);
$routeProvider.when('/', {
redirectTo : '/login'
}).when('/dashboard', {
templateUrl: 'app/dashboard/dashboard.html',
controller: 'dashboard'
}).when('/login', {
templateUrl: 'app/layout/login.html'
}).when('/register', {
templateUrl: 'app/layout/register.html'
}).otherwise({
redirectTo: '/'
});
}]);
It's probably loading from the browser cache rather than the changed copy from the server.
Try
to load it from the server.
https://developer.mozilla.org/en-US/docs/Web/API/Location.reload