我对Angularjs很新。我已经设法为Angularjs安装了eclipse插件并启动了一个简单的代码。当我有下面的代码时,表达式正在正确评估。我访问过stackoverflow广告中报告的类似问题已尝试过所有建议,但在我的情况下,我只评估{{7 + 8}}这是直截了当的。请在此任何帮助表示赞赏。感谢。
<html ng-app>
一旦我更改为poing ng-app到我的模块,分页和表达式就不会评估。
<html ng-app = "corpo"> --> Fails
myapp.html
<html ng-app>
<head>
<script type="text/javascript" src="corp/WebContent/corp.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<title>Corp</title>
</head>
<body>
<div>
<p>{{ 7 + 19 }}</p>
</div>
</body>
</html>
corp.js
var corp = angular.module('corpo', []);
此外,我一直收到未定义的javascript文件,并且我已禁用属性下的验证。
答案 0 :(得分:1)
将公司放在角度库的下方
喜欢这个
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<script type="text/javascript" src="corp/WebContent/corp.js"></script>
答案 1 :(得分:0)
74-85-81-234:Desktop Cody$ ./PyTest.sh
FE FI FO FUM I'M GOING TO MAKE IT TUMBLE TUM TUM
9
No semicolons here!
./PyTest.sh: line 5: syntax error near unexpected token `"FE FI FO FUM I'M GOING TO MAKE IT TUMBLE TUM TUM"'
./PyTest.sh: line 5: `print("FE FI FO FUM I'M GOING TO MAKE IT TUMBLE TUM TUM")'
var corp = angular.module('corpo', []);
更改此
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<html ng-app="corpo">
<head>
<title>Corp</title>
</head>
<body>
<div>
<p>{{ 7 + 19 }}</p>
</div>
</body>
</html>
答案 2 :(得分:0)
Its failing because you have injected corp.js before angular.min.js
corp.js after angular.min.js, it will start working
答案 3 :(得分:0)