I am trying to update the front end by changing scope variable value after http response .
The scope variable is updated correctly but event happens after the alert() even though alert is placed after the statement where i am updating scope variable :
if (data.status === "Success") {
$scope.close = null;// close updates dom after next statement which is not expected .
alert(data.successmessage);
}