Inside homeController file I have function
$scope.MyFunction = function () {
$http({
method: 'POST',
url: '/SomeUrl/ActionToDo',
data: { id: 1001 },
}).success(function (response) {
if (response.Status == 1) {
//success to do
}
$modal.open({
controller: 'modalController',
templateUrl: '/app/views/modalTemplate.html',
resolve: {
myData: function () {
return response;
}
}
});
} else {
alert(error);
}
}).error(function () {
alert('Error!');
});
}
Where I'm calling modalController to open modal window. Question is how can I pass data to this controller (modalController) from homeController in order to inject currently selected language which is available inside homeController in variable $scope.selLanguage