Trying to retrieve using angular the json found at: "https://api.github.com/users/angular", more precisely the id property from that json. Any thoughts on why this fails (in debug mode I get a
'response is not defined'
):
<html ng-app="myViewer">
<head>
<script data-require="angular.js@*" data-semver="1.2.25" src="https://code.angularjs.org/1.2.25/angular.js"></script>
</head>
<body ng-controller="MyController">
    {{ result.id }}
    {{ err }}
</body>
<script type="text/javascript">
(function() {
    var app = angular.module("myViewer", []);
    var MyController = function($scope, $http)
    {
        $http.get("https://api.github.com/users/angular")
        .then(function1, onerr);
        var function1 = function(response)
        {
            $scope.result = response.data;
        }
        var onerr = function(reason)
        {
            $scope.err = "nightmare";
        }
    }
    app.controller("MyController", ["$scope", "$http", MyController]);
}());
</script>
</html>
I expect the result to be the id that you can see by copying that link in your browser.

