in 1 controller I have a variable:
$scope.text = 'text';
I click the button (in 1 controller). I open the window:
function clickDialog() {
$mdDialog.show({
controller: 'SecondController',
templateUrl: 'path/second.html',
parent: angular.element(document.body)
});
}
in controller SecondController
I click the button and I want to change the variable $scope.text = 'another text';
that is in 1 controller
How to do it?