title: Can locals be injected into a controller set with ng-controller?
body: <p>Referring to the example below, is there a way to use myCtrl instead of myCtrl2, passing an argument as a local instead of attached to $scope?</p>
  
  <p>The <a href="http://docs.angularjs.org/api/ng.%24controller" rel="noreferrer">$controller</a> service performs exactly the operation needed to wrap an existing controller, but it can't be accessed from the template.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div ng-app&gt;
  
    &lt;script type="text/ng-template" id="/tpl.html"&gt;
      value of y: {{y}}
    &lt;/script&gt;
  
    &lt;div 
      ng-repeat='x in [1,2,3]' 
      ng-controller='myCtrl2'
      ng-include="'/tpl.html'"&gt;
    &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>function myCtrl($scope, x){
    $scope.y = x * 20;
  }
  
  function myCtrl2($scope){
    $scope.y = $scope.x * 20;
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/4Zmym/16/" rel="noreferrer">http://jsfiddle.net/4Zmym/16/</a></p>