title: Angular JS custom directive - Attribute binding to string or scope variable
body: <p>Is it possible when creating a custom directive to have an attribute which can be a string or two way bound to something on the scope?</p>
  
  <p>So, for example if I have this in my directive declaration:</p>
  
  <pre><code>$scope: {
      position: '=?'
  }
  </code></pre>
  
  <p>and then alert it in my link function or controller:</p>
  
  <pre><code>$alert($scope.position);
  </code></pre>
  
  <p>It works if I actually bind it to something on my parent scope, but if I just put a string in I get undefined unless I use single quotes inside the double quotes. E.g.</p>
  
  <pre><code>&lt;my-directive position="'right'"&gt;&lt;/my-directive&gt;
  </code></pre>
  
  <p>That way it evaluates the expression as a string, but It seems ugly. I'd rather be able to use position="right" when I want to give the attribute a string, or use position="{{scopeVariable}}" when I want to bind it to two way bind it to something in the parent controller.</p>
  
  <p>Am I wrong to be using "=?" as the isolate scope binding? Is there a better way to do this? Or should I just get used to using single quotes inside double quotes?</p>