谁能告诉我为什么 Angular 这个非常基本的例子不起作用?
<div ng-app>
<div ng-controller="DemoCtrl">
Hi, {{firstName}} {{lastName}}!
</div>
</div>
function DemoCtrl($scope)
{
$scope.firstName = "Steve";
$scope.lastName = "Smith";
}
它给出了错误 "Argument 'DemoCtrl' is not a function, got undefined" 。. . JsFiddle 在这里:http: //jsfiddle.net/SfU3z/