在我的angularJS項目中,我遇到了錯誤。你能幫我麼?爲什麼在我的angularjs項目中出現語法錯誤
錯誤
angular.min.js:117Error:[$解析:語法] http://errors.angularjs.org/1.5.6/ $解析/語法P0 = SHOPING & P1 =是%20AN%20unexpected%20token & P2 = 8 & P3 =在線%20Shoping%20-%20login & P4 = SHOPING%20-%20login 在位於localhost錯誤(天然) :8082/onlineshopping/angular.min.js:6:412 在Object.s.throwError (localhost:8082/onlineshopping/angular.min.js:228:143) at Object.s.ast(localhost (8082/onlineshopping/angular.min.js:220:47) at kc.parse(localhost:8082/onlineshopping (localhost:8082/onlineshopping/angular.min.js:125:278) at k(localhost:8082/onlineshopping/angular.min.js:105:129) ) 在$(本地主機:8082/onlineshopping/angular.min.js:77:397) 在$ b(本地主機:8082/onlineshopping/angular.min.js:61:398)
My HTML Code
<!DOCTYPE html>
<html>
<head>
<title>Online Shopping - Login Page</title>
<script src="angular.min.js"></script>
<!-- <link rel="stylesheet" href=".\WEB-INF\lib\css\Styles.css"/> -->
</head>
<body ng-app>
<div style="text-align:center">
<h1>{{Online Shoping - login}}</h1>
<form action="login_submit" name="login" method="get">
Email Address: <input type="email" placeholder="[email protected]" required/><br><br>
Password: <input type="password" placeholder="password" required/><br><br><br>
<input type="submit" value="Login"/>
</form>
</div>
</body>
</html>
'網上購物'不是一個有效的變量名稱,Angular會試圖將其解釋爲'Online'和'Shopping'兩個變量,一個接一個地無效。 –
我是AngularJS的新手。我沒有詳細檢查。現在我得到了。感謝Patrick。 –