Last active
August 29, 2015 14:22
This file contains hidden or 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