<!DOCTYPE html>
<html ng-app="github">
  <head>
    <script data-require="angular.js@*" data-semver="1.3.0-beta.5" src="https://code.angularjs.org/1.3.0-beta.5/angular.js"></script>
    <link rel="stylesheet" href="style.css" />
    <script src="script.js"></script>
  </head>
  <body ng-controller="getUserInfo">
    
    <div class="error" ng-show="error">
      {{ error }}
    </div>
    
    <div ng-hide="error">
      <img src="{{ user.avatar_url }}" alt="" height="100"><br />
      Ad: {{ user.name }}<br />
      Şirket: {{ user.company }}<br />
      Lokasyon: {{ user.location }}
    </div>
    
  </body>
</html>
var github = angular.module('github', []);

github.controller('getUserInfo', ['$scope', '$http', function($scope, $http){

  var onComplete = function(response){
    $scope.user = response.data;
  };
  
  var onError = function(response){
    $scope.error = 'Github kullanıcısı bulunamadı!';
    console.log(response);
  }
  
  $http.get('https://api.github.com/users/tayfunerbilen')
       .then(onComplete, onError);
  
}]);
.error {
  border: 1px solid darkred;
  color: darkred;
}