Last active
August 29, 2015 14:22
-
-
Save chalkers/17d290f3fab2d1fe651b 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
angular.module('starter.controllers', []) | |
.controller('DashCtrl', function($scope, $http) { | |
//Get profile information | |
$http.get('https://teamtreehouse.com/chalkers.json'). | |
success(function(data, status, headers, config) { | |
// this callback will be called asynchronously | |
// when the response is available | |
$scope.badges = data.badges; | |
}). | |
error(function(data, status, headers, config) { | |
// called asynchronously if an error occurs | |
// or server returns response with an error status. | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment