I got a problem with including AngularJS/javascript into my html document. Every time i load my index.html i got this error:
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".
This are my script tags:
<script src="./assets/angular/1.2.9/angular.js"></script>
<script src="./assets/angular/1.2.9/angular-route.js"></script>
What i have tried so far:
Include <?php Header("Content-Type: application/x-javascript; charset=UTF-8"); ?>
<?php Header("Content-Type: application/x-javascript; charset=UTF-8"); ?>
, Defining that the script tag text/javascript is or application/javascript
I hope that you guys can help me with this problem.
尝试将type="text/javascript"
放入脚本标签中
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.