正如标题所示,我试图自学Angular.js,但我遇到了一个意想不到的令人沮丧的路障......我甚至无法让变量正确显示在网页上!角度变量没有正确显示在网页上
<!DOCTYPE html>
<html ng-app>
<head>
<title>Lets test this out?</title>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
Write your name in the text box!
<input type="text" ng-model="sometext" />
<h1>Hello {{ sometext }}</h1>
</body>
</html>
我会非常感谢任何人都可以告诉我,我在做什么错了,因为我一直在打我的头靠在我的办公桌上了一小时,用Google搜索这个问题,但我不明白为什么它不”工作。
在您的身体标记中添加** ng-app **。例如'
' – Rostech这是在这里工作https://plnkr.co/edit/K8zEYdUhiun2qAgQU2Hi?p=preview –