Why do I get "Error: [ng:areq] http://errors.angularjs.org/1.3.5/ng/areq?p0=GreetingController&p1=not%20a%20function%2C%20got%20undefined"

Why do I get "Error: [ng:areq] http://errors.angularjs.org/1.3.5/ng/areq?p0=GreetingController&p1=not%20a%20function%2C%20got%20undefined"

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.3.0.min.js"></script>


<html>
    <script>
        var myApp = angular.module('myApp', []);

        myApp.controller('GreetingController', ['$scope', function ($scope) {
            $scope.greeting = 'Hola!';
        }]);

    </script>

    <body ng-app>
        {{1+2}}
        <div ng-controller="GreetingController">
            {{ greeting }}
        </div>
</body>
</html>

你能解释一下为什么它给我 错误:[ng:areq] http://errors.angularjs.org/1.3.5/ng/areq?p0=GreetingController&p1=not%20a%20function%2C%20got%20undefined

您需要添加ng-app="myApp"

有关 ngApp 指令的更多信息 here