【发布时间】:2014-07-15 13:57:05
【问题描述】:
在我的 html 文档中包含 AngularJS/javascript 时遇到问题。每次我加载我的 index.html 时都会出现这个错误:
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:8888/assets/angular/1.2.9/angular-route.js". index.html:17
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:8888/assets/angular/1.2.9/angular.js".
这是我的脚本标签:
<script src="./assets/angular/1.2.9/angular.js"></script>
<script src="./assets/angular/1.2.9/angular-route.js"></script>
到目前为止我所尝试的:
包括<?php Header("Content-Type: application/x-javascript; charset=UTF-8"); ?>,
定义脚本标签 text/javascript 是或 application/javascript
希望你们能帮我解决这个问题。
【问题讨论】:
标签: javascript html