我遇到了将AngularJS / javascript包含到我的html文档中的问题。每次我加载我的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
我希望你们可以帮我解决这个问题。
答案 0 :(得分:0)
尝试将type="text/javascript"
放入脚本代码