Le 13/07/2014 19:07, Ovidiu Mura a écrit :
> <!DOCTYPE html>
> <html>
> <head>
>     <script
> src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js";></script>
> </head>
>
> <body ng-app="myapp">
>
> <script>
>     var myList = function($scope){
>         $scope.foods = ['Pizza','Pasta','Burger','Icecream','Pepsi'];
>     };
> </script>
>
> <div ng-controller="myList" ng-model="foods">
>     <ul>
>         <li ng-repeat="food in foods">{{food}}</li>
>     </ul>
> </div>
>
> </body>
> </html>
In this case you don't use a myapp module, so your example is working
fine if you replace
<body ng-app="myapp">
with
<body ng-app>

-- 
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.

Reply via email to