angularjs – angular.module最小

这怎么回事?你不需要抛出“no module:tut”错误所需的最小值是多少?

<!DOCTYPE html>
<html ng-app="tut">
    <head>
        <script type="text/javascript" src="./jquery.js"></script>
        <script type="text/javascript" src="./script-ng.js"></script>
        <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
          <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>
        <link rel="stylesheet" href="main.css"></link>
    </head>
    <body>
        <div id="sidebar_left"><div id="header"></div><ul id="nav"></ul></div>
        <div id="container">


            <video id="video" controls>

                        Your browser does not support the video tag.</video>
            <br />
            <button id="reset">Replay</button>

        <br />
        <div ng-controller="getAnswers" id="pannel">
            <div id="base">{{verbs.base}}</div>
            <ul class="answers">
                <li ng-click="checkAnswer($event)" ng-repeat="answer in verbs.conjugations" class="answer {{answer.correct}}" id="answer{{$index}}">{{answer.text}}</li>
            </ul>
        </div>
        <br />
        <br />
        <br />
        <div id="warning"></div>
    </div>
</body>
angular.module('tut', []).controller('getAnswers', function ($scope, $element){
    $scope.verbs = conjugate(conjugationsets[tutorial_number][questionnum]);
    $scope.randomizeAnswers = function () {
      fisherYates($scope.verbs.conjugations);
    }();

    $scope.checkAnswer = function (){
        checkanswer();
    }
});
最佳答案
非常简单.您可能忘了这样做,jus在ur js文件的顶部添加angularjs库.

转载注明原文:angularjs – angular.module最小 - 代码日志