Recently, I've started delving into the world of debugging JavaScript and AngularJS. Despite having breakpoints set up at almost every line in the code snippet below, I can't seem to locate the response
variable or the values for data
and content
in the Firefox debugger. The nested variable structure in the debugger is quite intricate. Could someone please guide me on where to search within the Firefox debugger variables structure to uncover the values assigned to response
, data
, and content
in the code provided?
Upon checking, I noticed that the value of the confirmStatus
variable remains unchanged from its default setting, even though console logs from the backend service call indicated its execution. I'm keen on understanding what exactly is being returned and in what format, so I can make modifications to the client-side code listed below.
Below is the portion of JavaScript code I'm currently analyzing with the debugger:
$scope.$on('$viewContentLoaded', function() {
var str1 = "/confirm-email?d=";
var str2 = $routeParams.d;
var res = str1.concat(str2);
$http.post(res).then(function(response) {
$scope.confirmStatus = response.data.content;
});
var str3 = "confirmStatus is: ";
alert(str3.concat($scope.confirmStatus))
alert("viewContentLoaded!")
});