Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@luckyduck
Created December 22, 2013 17:28
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 luckyduck/8085748 to your computer and use it in GitHub Desktop.
Save luckyduck/8085748 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var angularlistApp = angular.module('angularlistApp', []);
angularlistApp.controller('ProductListCtrl', function($scope, $http) {
$http.get('<?php echo Mage::getBaseUrl()?>api/rest/products').success(function(data) {
$scope.products = data;
});
});
</script>
<div ng-app="angularlistApp">
<div ng-controller="ProductListCtrl">
<ul>
<li ng-repeat="product in products">
{{product.name}}
<p>{{product.description}}</p>
</li>
</ul>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment