I am trying to access a parent scope, but I am getting the error that the scope is undefined.
MyApp.controller('AdminController', function ($scope, $http, $filter, $mdDialog, $window, $location, $mdToast) {
$scope.test = "Test";
}).
controller('ToastCtrl', function($scope, $mdToast, $mdDialog) {
    $scope.openMoreInfo = function(e) {
        if ( isDlgOpen ) return;
        isDlgOpen = true;
        $mdDialog
          .show($mdDialog
            .alert()
            .title($scope.$parent.test)
            .targetEvent(e)
          )
          .then(function() {
              isDlgOpen = false;
          })
    };
}); 
Any suggestion, why I am getting this error.
Thank you in advance.
 
     
    