未捕获的语法错误:意外的标记 <使用 bootstrap js 时 [英] Uncaught SyntaxError: Unexpected token < when using bootstrap js
问题描述
这是我的 index.html 的代码:
Here is the code of my index.html:
<html>
<head>
<meta charset="UTF-8" >
<title>Index</title>
<link rel="stylesheet" href="styles/main.css" />
<link rel="stylesheet" ng-href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
</head>
<body ng-app="app">
<div ng-view></div>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="scripts/angular/app.js"></script>
<script src="scripts/angular/controllers.js"></script>
</body>
</html>
然而,它显示返回错误:
However, it shows the error in return:
bootstrap.min.js:1 Uncaught SyntaxError: Unexpected token <
bootstrap.min.js:1 Uncaught SyntaxError: Unexpected token <
ui-bootstrap-tpls.min.js:1 Uncaught SyntaxError: Unexpected token <
ui-bootstrap-tpls.min.js:1 Uncaught SyntaxError: Unexpected token <
是我的代码或引导程序的问题?添加
Is it the problem of my code or bootstrap? I found the error exists when I add
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
和
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
进入index.html
.有谁知道错误的原因?谢谢:)
into the index.html
. Does anyone know the cause of the error? Thanks :)
推荐答案
这绝对是引导文件的问题.第 1 行包含<".
Its definitely a problem with the bootstrap file. The line 1 contains '<'.
尝试手动打开文件并将其删除.
Try manually opening the files and removing it.
这篇关于未捕获的语法错误:意外的标记 <使用 bootstrap js 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!