Created
October 30, 2014 16:33
-
-
Save dirkk0/715257c80b3fc5ac7e86 to your computer and use it in GitHub Desktop.
This file contains 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
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> | |
<script> | |
var vegetables = [{ | |
"name": "Carrot" | |
}, { | |
"name": "Potato" | |
}, { | |
"name": "Broccoli" | |
}]; | |
var myApp = angular.module('myApp', []); | |
myApp.controller('myController', function ($scope) { | |
$scope.veggies = vegetables; | |
}); | |
</script> | |
<div ng-app="myApp"> | |
<div ng-controller="myController"> | |
<ul> | |
<li ng-repeat="veg in veggies"> | |
{{veg.name}} | |
</li> | |
</ul> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment