[CODE]
> <!DOCTYPE html>
> <html ng-app="myApp">
>
> <head>
>
> </head>
>
> <body>
>
> <div ng-controller = "ToDoController">
> <ul><li ng-repeat="do in todo"> {{do.name}}</li></ul>
> </div>
>
>
> <script src="angular.min.js"></script>
> <script type="text/javascript" src="Myfunction.js" ></script>
>
> </body>
> </html>
> [/CODE]
>
> The Myfunction.js file is;
>
> [CODE]
>
angular.module('myApp',[]).controller('ToDoController', ToDoController);
ToDoController.$inject = ['$scope'];
> 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]
>
This shoul do the trick. Andular 1.x
--
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.