NotoriousWebmaster NotoriousWebmaster - 5 months ago 26
AngularJS Question

Angular map file not found

I've just downloaded a fresh copy of angular.min.js, and I'm getting a 404 on angular.min.js.map, which I'm not including in my code:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
</head>
<body>
<script type="text/javascript" src="js/angular.min.js"></script>
</body>
</html>


The error in Chrome:

GET http://angular.dev/js/angular.min.js.map 404 (Not Found)

Answer

Open the angular.min.js file in a text editor. There will be a comment at the end like this:

//# sourceMappingURL=angular.min.js.map

Delete that and the error will disappear.

A map file facilitates regenerating the minified version of a script based on changes to a non-minified version. Since you won't be making changes to angular.js, you don't need the map.

Comments