Going over this tutorial. http://codewala.net/2014/05/28/learning-angularjs-with-examplespart-1/
I used nuget to get angular js (angularjs.html)
I replaced
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
with
<script src="Scripts/angular.js" type="text/javascript"></script>
This breaks even though the Scripts directory contains angular.js.
Complete code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hello world with AngularJS</title>
<script src="Scripts/angular.js" type="text/javascript"></script>
</head>
<body style="font-family:Verdana, Geneva, 'DejaVu Sans', sans-serif">
<h1 ng-app ng-controller="HelloWorldCtrl"> {{helloWorldMessage}}</h1>
<script type="text/javascript">
function HelloWorldCtrl($scope) {
$scope.helloWorldMessage = "Hello World " + (new Date()).toDateString();
}
</script>
</body>
</html>
Error: Argument 'HelloWorldCtrl' is not a function, got undefined
alert('hello');in the same directory and include it. Otherwise, are you sure it's the same version? There have been many changes since 1.0.7. What error do you get in the console? And are you hosting the code or is it static?