title: Using a complex object as a directive binding
body: <p>I have a field which is populated by a typeahead field. The typeahead field sets a complex object onto the model.</p>
  
  <p>I want to use one of the properties on the typeahead result to populate my custom directive.</p>
  
  <p>eg:</p>
  
  <pre><code>&lt;something content='typeaheadResult.id'&gt;&lt;/something&gt;
  </code></pre>
  
  <p>However it doesnt seem to update when the result is populated. I think this may be because typeaheadResult doesnt have an id property until the value is selected.</p>
  
  <p><strong>How can i bind using a subpropery of the result?</strong> </p>
  
  <p>I have tried a few things such as using a computed value as an intermediate but nothing seems to work.</p>
  
  <p>eg:</p>
  
  <pre><code>scope.resultId = function(){ 
      return typeaheadResult !== undefined ? typeaheadResult.id : ''; 
  }
  </code></pre>
  
  <p>the directive works fine with non-typeahead scope values.</p>
  
  <p>plnkr: <a href="http://plnkr.co/edit/IKIMkeTQnbUJG3aUnT1s" rel="nofollow">http://plnkr.co/edit/IKIMkeTQnbUJG3aUnT1s</a></p>