I have this ngDialog modal:
$scope.showMessage = function(size, status, data) {
// open modal page
ngDialog.open({
scope: $scope,
template: 'orderResponse.html',
controller: $controller('OrderResponseModalController', {
$scope: $scope,
responseStatus: status,
responseData: data
}),
className: 'createGroup',
closeByDocument: false,
closeByEscape: false
});
};
So, basically, it will open a modal for which OrderResponseModalController will be responsible, and it sends to this controller three values.
There is this code inside this controller:
$scope.message = responseData.message;
$scope.title = responseData.title;
...
$location.path("purchases");
orderResponse.html looks something like this:
<p>{{ message }}</p>
<h1>{{ title }}</h1>
However, the values of these variables are not shown in the browser(just {{message}}). I think it is because $location.path is also changing the Controller $scope.
Is there any way to fix this?