0

I am assigned response data to $scope.ShippingCharges but it does not effect immediately on the view.

$scope.selectedAddress = function(ID)
    {
        $.ajax({
            type: "GET",
            url: "http://localhost:49917/ShoppingCart/CalculateShipping",
            dataType: "json",
            data: { 'Id': ID },
            contentType: 'application/json; charset=utf-8',
            success: function (data) {
                if (data != null) {
                    $scope.ShippingCharges = data;
                }
            },
            error: function (e) {
                console.log(e);
            }
        });
   }
<p style="margin:0"><span ng-bind="ShippingCharges"></span></p>
Parth Savadiya
  • 1,203
  • 3
  • 18
  • 40

0 Answers0