I am facing an issue with transferring the $scope variable from ctrlone to ctrltwo, which is a modal window on my page.
When I open the modal in ctrlone, my code looks like this:
var modalInstance = $modal.open({
templateUrl: 'Modal.html',
windowClass: 'ModalWidth',
$scope: function() {
var scope = $scope;
}(),
controller: "ctrltwo" });
The controller for ctrltwo is as follows:
.controller('ctrltwo', ["$scope", "$modal","itTransport", function ($scope, $modal,transport) {
var test = $scope;
}])
However, it seems that the $scope variable is not being successfully copied over. Any ideas on how to resolve this issue?