title: Watching for change in select options
body: <p>I want to disable an input based on number of elements in it (eg. disable in case of only 1 element). Right now I have my eyes on a directive. The reason I went with a directive is that the ng-options often get quite complicated so it would be annoying to copy/paste them with a comparison into an ng-disabled.</p>
  
  <p>My problem is that I cannot listen to the number of options in the select (or at least I couldn't find a way yet). I.e. my idea would have been to do something like so in the link-function. Basic select (auto-disable being my directive):</p>
  
  <pre><code>&lt;select name="field1" ng-model="data.field1" ng-options="i.value as i.text for i in values" auto-disable &gt;
    &lt;option disabled value="" style="display: none;"&gt;placeholder&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>and the link method being defined as such:</p>
  
  <pre><code>link: function (scope, elem, attrs) {
    scope.$watch(elem[0].length, function() {
      elem.prop('disabled', elem[0].length &lt;= 1);
    });
  }
  </code></pre>
  
  <p>So: Is there some way to watch the elements in a select, or can I somehow access the select's option count easily inside the ng-disabled?</p>
  
  <p>PS: I already tried listening to "data.field1" but that does not work in all cases (eg. if just other values change but the selected value does not).</p>