title: get directive attribute defined in HTML in directive controller
body: <p>I am creating a custom controller where I want to get directive attributes in controllers . Here what I have done so far but I am not able to get the attribute value . </p>
  
  <p><strong>HTML Code :</strong></p>
  
  <pre><code>&lt;my-text name="tester"&gt;&lt;/my-text&gt;
  </code></pre>
  
  <p><strong>Angular code :</strong> </p>
  
  <pre><code>app.directive('MyText', function() {
     var controller = ['$scope', function ($scope) {
          console.log($scope.name)
          $scope.text = $scope.name
        }];
    return {
      restrict: 'EA',
      scope: {
        name: '='
      },
      controller: controller,
      template: 'Name: {$ text $}'
    };
  });
  </code></pre>
  
  <p>you can see I have defined an attribute in HTML <code>name</code> have value <code>tester</code> I want to get this value in directive controller so that I can do some calculation on this and show result in <code>template</code> . Its just a demo what I am trying to do but in the end I'll send $http request to backend (attribute values in POST) and show response in template HTML.</p>
  
  <p>Any suggestion where I am wrong ?</p>
  
  <p>Note : I am using this <code>{$ var $}</code> syntax in angular because I am overwriting angular default syntax since I am using Python /Django as backend and both have similar syntax </p>