Last active
August 23, 2016 14:39
-
-
Save pcote/0794d4a56655a9509af6f0912ac72f5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>AngularJS looping example</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script> | |
| </head> | |
| <body> | |
| <div ng-app="app" ng-controller="controller"> | |
| <ul> | |
| <li ng-repeat="word in words">{{word}}</li> | |
| </ul> | |
| </div> | |
| <script> | |
| var controller = function($scope){ | |
| $scope.words = "This is my list of words".split(" "); | |
| }; | |
| angular.module("app", []) | |
| .controller("controller", controller); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment