I am new to AngularJS so I am trying to get a simple example working. It is
binding a div to an array
I am getting an error Uncaught Error: [$injector:modulerr] on line 6 of
angular.min.js:6
It is very similar code to what is on this
example:[URL="http://sravi-kiran.blogspot.ie/2013/02/EasyTwoWayDataBindingInHtmlPagesWithAngularJS.html"]http://sravi-kiran.blogspot.ie/2013/02/EasyTwoWayDataBindingInHtmlPagesWithAngularJS.html[/URL]
The html code is below:
[CODE]
<!DOCTYPE html>
<html ng-app="myApp">
<head>
</head>
<body>
<div ng-controller = "ToDoController">
{{name}}
</div>
<script src="angular.min.js"></script>
<script type="text/javascript" src="Myfunction.js" ></script>
</body>
</html>
[/CODE]
The Myfunction.js file is;
[CODE]
function ToDoController ($scope)
{
$scope.todo = [
{name: 'Wash Dog', description: 'Looking after pet'},
{name: 'Cut grass', description: 'Looking after garden'},
{name: 'Collect washing', description: 'Clothes line'},
{name: 'Buy milk', description: 'Do shopping'}
];
}
[/CODE]
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.