Main listing page has edit button. Which opens details of the edited row.
Way-1: Now, if I set \"ctrl.parent.q_details.client_location\" it is bind wit
This guy always has the right answer: https://github.com/angular/material/issues/455#issuecomment-59889129
In short:
$mdDialog.show({
locals:{dataToPass: $scope.parentScopeData},
clickOutsideToClose: true,
controllerAs: 'ctrl',
templateUrl: 'quotation/edit/',//+edit_id,
controller: mdDialogCtrl,
});
var mdDialogCtrl = function ($scope, dataToPass) {
$scope.mdDialogData = dataToPass
}
Pass the variable using the locals attribute in the passing object. These values will be injected into the controller not the $scope. Also passing the entire $scope of the parent might not be such a good idea as it defeats the isolated scope paradigm.