Created
December 23, 2013 07:50
-
-
Save luckyduck/8093173 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 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