title: How to get the dropdown list box text using angularjs?
body: <p>How can I get the dropdown list box selected text value, and find the source of the function calling(where from the function was called).</p>
  
  <pre><code>&lt;div ng-controller="cntrl"&gt;
  &lt;select id="dflfnt"  ng-change="opfun()" ng-model='mddl1' ng-options='option.value as option.name for option in ddl1Options.data'&gt; 
  &lt;/select&gt;
  
  &lt;select id="3dfnt" ng-model='mddl2' ng-change="opfun()" ng-options="option.value as option.name for option in ddl2option.data"&gt;
  
  &lt;/select&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  function cntrl($scope)
  {
  $scope.ddl1Options={
  data:[
  {value:"Georgia, serif",name:"Style 1"},
  {value:"'Palatino Linotype', 'Book Antiqua', Palatino, serif",name:"Style 2"}
  ]};
  
  $scope.ddl2option={
  data:[
  {value:"font-effect-anaglyph",name:"anaglyph"},
  {value:"font-effect-brick-sign",name:"brick-sign"},
  {value:"font-effect-canvas-print",name:"canvas-print"},
  {value:"font-effect-crackle",name:"crackle"}
  ]};
  
  
      $scope.opfun=function(){            
          alert($scope.mddl1); // Here I can get the value only
      }
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>In above I want to know where from the <strong>opfun()</strong> is trigger and get the selected text of the dropdownlistbox.</p>
  
  <p>I am tried to get the text like below.</p>
  
  <pre><code>alert($scope.ddl2option.data[0].name);
  </code></pre>
  
  <p>But it was display always selected index.</p>