Skip to content

Instantly share code, notes, and snippets.

@dirkk0
Created October 30, 2014 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirkk0/715257c80b3fc5ac7e86 to your computer and use it in GitHub Desktop.
Save dirkk0/715257c80b3fc5ac7e86 to your computer and use it in GitHub Desktop.
<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