Here is the HTML code snippet I am working with:
<div class="col-md-4">{{ctrl.serviceInstance.additionalPorts}}<span
ng-if="ctrl.serviceInstanceOfActiveDeployment != null && !ctrl.compareArrays(ctrl.serviceInstanceOfActiveDeployment.additionalPorts, ctrl.serviceInstance.additionalPorts)"
class="glyphicon glyphicon-alert alert-icon"
uib-tooltip-html="'Active Deployment has a different set of Additional Ports.'"></span>
</div>
This is how the controller function is defined:
function _compareArrays(arr1, arr2){
if (arr1 === null && arr2 === null)
return true;
if (arr1 != null && arr2 != null) {
arr1.sort();
arr2.sort();
var result = arr1.length == arr2.length && arr1.every(function(element, index) {
return element === arr2[index];
});
return result;
}
return false;
}
I need to determine the values passed to variables arr1
and arr2
. The browser is minifying the code making it difficult to access these variables directly in the console. Any suggestions on how I can tackle this issue?
Appreciate any advice!