title: Passing variable to directive template
body: <p>What I'm trying to do is something like this:</p>
  
  <pre><code>&lt;rule-type-selector class="protractor-test-rule-description" all-rule-types="allRuleTypes" local-value="$parent.$parent.currentRuleDescription" on-selection-change="onSelectNewRuleType()" disabled="disabled"&gt;
  &lt;/rule-type-selector&gt;
  </code></pre>
  
  <p>And in the directive</p>
  
  <pre><code>  return {
      restrict: 'E',
      scope: {
        allRuleTypes: '&amp;',
        localValue: '=',
        onSelectionChange: '&amp;',
        disabled: '=' 
      },
      template: function($scope) {
        if($scope.disabled) {
          return '&lt;input type="hidden" disabled&gt;';
        }
        return '&lt;input type="hidden"&gt;';
      }
  </code></pre>
  
  <p>This doesn't work. I always hit the 2nd return statement irrespective of whether disabled is set or not. 
  I've looked at <a href="https://stackoverflow.com/questions/20810862/passing-value-of-a-variable-to-angularjs-directive-template-function">Passing value of a variable to angularjs directive template function</a> but my use case seems to be a bit different. </p>