Angularjs $ http jquery $ .ajax

Puis-je définir context dans Angularjs $http comme nous pouvons le faire dans jQuery's $.ajax?

define([
    'app'
], function(app) {

    app.controller("controller1", function($scope, $route, $http) {

        return $http({
            method: 'GET',
            url: 'server.php'
        }).then(function(response) {
            $scope.contacts = response.data;
        });
    });
});

Aussi, il y a plus de rappels en jQuery $.ajaxcomme .done.promise qui je peux les utiliser pour manipuler le context comme ce ci-dessous, je me demande si je peux faire la même chose dans Angularjs?

$.ajax({
    type:       "GET",
    dataType:   "HTML",
    url:        'server.php',
    context:    $("#container"),
    async:      true,
    beforeSend: function() {

        $(this).html('loading...');
    },
    success: function (returndata, status, jqxhr) {
        $(this).html(returndata).hide().fadeIn();
    },
    }).fail(function() { 
        alert("error"); 
    }).done(function(returndata) {
    },
    .always(function() { 
        alert("complete"); 
    }
});

source d'informationauteur laukok