title: Setting angular.js controller variable from within a directive without ngOptions
body: <p>I want to set the selected option's text to a controller variable exactly like how ngModel does this for the value attribute of the selected option.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div ng-controller="Subjects as ctrl"&gt;
    &lt;select ng-model="ctrl.model.fieldId" text-model="ctrl.model.fieldName"&gt;
      &lt;option value="1"&gt;yes&lt;/option&gt;
      &lt;option value="2"&gt;no&lt;/option&gt;
    &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>how can I set the <code>ctrl.model.fieldName</code> to <code>yes</code> for example if the first option was selected which is not a function from within the directive? this directive have to work alongside ngModel.</p>
  
  <p>I want a way without using ngOptions because I don't have any values array in my javascript, although I can parse the HTML and create one.</p>
  
  <p>This the directive so far:</p>
  
  <pre class="lang-js prettyprint-override"><code>(function () {
      angular
          .module('app')
          .directive('TextModel', TextModel);
      function TextModel($compile) {
          return {
              restrict: 'A',
              link: function ($scope, elem, attr) {
                  elem.on('change', selectChanged);
                  $scope.$on('$destroy', function () {
                      elem.off('change', selectChanged);
                  });
                  function selectChanged() {
                      var selectedText = elem.find('option:selected').text();
                      //YAY! I have the selected option's text
                      console.log(selectedText);
                      //now how can I set ctrl.model.fieldName = selectedText ??
                  }
              }
          };
      };
  
  })();
  </code></pre>