Skip to content

Instantly share code, notes, and snippets.

@nareeboy
Created April 10, 2014 22:11
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 nareeboy/10428091 to your computer and use it in GitHub Desktop.
Save nareeboy/10428091 to your computer and use it in GitHub Desktop.
Angular - JSON call script
var myAppTest = angular.module('myAppTest' , []);
myAppTest.controller('MyController' , ['$scope' , '$http', function ($scope , $http){
$http.get('js/data.json').success(function(data){
$scope.artists = data;
$scope.artistOrder = 'name';
})
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment