Pulse7
9/8/2017 - 7:42 PM

ng-click

input type="search" ng-model="username"
input type="submit" ng-click="search(username)"

h1 {{user.name}}
img ng-src="user.avatar_url"
==========
var onUserComplete = function (response) {
            $scope.user = response.data;
        }
        var onError = function (reason) {
            $scope.error = "Could not fetch the user";
        }
        $scope.search = (input) => {
            $http.get("http://api.github.com/users/" + input)
                .then(onUserComplete, onError);
        };