Skip to content

Instantly share code, notes, and snippets.

@luckyduck

luckyduck/list.phtml

Created Dec 22, 2013
Embed
What would you like to do?
<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
You can’t perform that action at this time.