这是我第一天,我试图得到一个简单的平衡工作,但事实并非如此。这里有一个小提琴:http://jsfiddle.net/LKktL/有棱角的第一天;我究竟做错了什么?
<body ng-app>
<div ng-controller='EventAddCtrl'>
<p>Nothing here {{'yet' + '!'}}</p>
<div class='first-test' ng-click="say_hello()">angular test to say hello</div>
</div>
</body>
function EventAddCtrl($scope){
$scope.say_hello = function() {
alert('hello in there');
}
}
这显然不工作,并试图找出原因。 thx提前
http://pkozlowskios.wordpress.com/2012/08/12/using-jsfiddle-with-angularjs/ –