Is there a way to get the outer controller name from directive in AngularJS?

I am new to AngularJS...Here is the quesiton:
for example:
HTML
<div ng-controller='DemoController'>
  <div my-directive></div>
</div>

JavaScript
app.directive('myDirective', function(){
  return {
    restrict: 'A',
    link: function(scope, element, attrs){
      //I want to get the outer controller name (in this case 'DemoController') here when using this directive
      // var controller_name = ?
    }
  };
});

How can I get the outer controller name ?
Thanks for your help

You can just pass whatever you want to your directive, using its attributes. See the guide about directives. In your case it's fine to do:
HTML
<div ng-controller='DemoController'>
  <div my-directive="DemoController"></div>
</div>

JS
app.directive('myDirective', function(){
  return {
    restrict: 'A',
    link: function(scope, element, attrs){
      var controller_name = attrs.myDirective;
    }
  };
});