How in the hell does this not work? what is the minimum you need for it to not throw the "no module: tut" error?
<!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();
}
});
Very simple. you may forgot to do this, jus add angularjs library on top of ur js file.
In most apps you only need one module, in your case you would need to include ng-app="app" in a HTML element that is a parent of the content you want to have angular work with.
Most of the times that is the tag which would make it
If you want to split up your code for testing purposes you can make multiple modules and include their names in the array of dependencies like so:
angular.module('tut', [ 'othermodule', 'andanothermodule']);
angular.module('othermodule');
etc.
Yeah the order of loading your scripts is wrong as noted in the comment by Josh.