If you want to wait for the first call to complete before you get the second file and if you want to ensure everything is loaded before comparing and contrasting:
app.controller('theController', function ($scope, $http) {
$http.get('first.json').success(function(response){
$scope.firstData = response;
$http.get('second.json').success(function(response1){
$scope.secondData = response1;
//add any other logic you need to do here to compare & contrast
//or add functions to $scope and call those functions from gui
});
});
});
Or, call them sequentially but then you need to ensure your comparing and contrasting can't start until both are loaded:
app.controller('theController', function ($scope, $http) {
$http.get('first.json').success(function(response){
$scope.firstData = response;
});
$http.get('second.json').success(function(response1){
$scope.secondData = response1;
});
//add any other logic you need in functions here to compare & contrast
//and add those functions to $scope and call those functions from gui
//only enabling once both firstData and secondData have content
});