角映射文件未找到 [英] Angular map file not found

查看:126
本文介绍了角映射文件未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚下载angular.min.js的全新副本,而我得到一个404 angular.min.js.map,这我不包括在我的code:

 <!DOCTYPE HTML>
< HTML和GT;
< HEAD>
    <链接rel =stylesheet属性类型=文/ CSS的href =CSS / bootstrap.min.css/>
< /头>
<身体GT;
    <脚本类型=文/ JavaScript的SRC =JS / angular.min.js>< / SCRIPT>
< /身体GT;
< / HTML>

在Chrome浏览器中的错误:

  GET http://angular.dev/js/angular.min.js.map 404(未找到)


解决方案

在文本编辑器中angular.min.js文件。会有在这样结尾的注释:

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

删除并且错误会消失。

一个地图文件有利于再生的基础上变化到非精缩版的脚本缩小的版本。既然你将不会被更改为angular.js,你不需要地图。

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)

解决方案

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.

这篇关于角映射文件未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆