title: Angularjs - Selected value row
body: <p>I base in this example:
  <a href="http://code.ciphertrick.com/2014/12/06/highlight-a-selected-row-in-ng-repeat-using-ng-class/" rel="nofollow">http://code.ciphertrick.com/2014/12/06/highlight-a-selected-row-in-ng-repeat-using-ng-class/</a>
  Demo:
  <a href="http://code.ciphertrick.com/demo/ngClass/" rel="nofollow">http://code.ciphertrick.com/demo/ngClass/</a></p>
  
  <p>The example is working ok, but i need to add a button element and when i click in the button, i want to show in a alert, the value of name column, for example "Noodles"</p>
  
  <p>This is my code html:</p>
  
  <pre><code>&lt;table class="table table-hover"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Branch&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr ng-repeat="organizational in organizationals" ng-class="{'selected':$index == selectedRow}" ng-click="setClickedRow($index)"&gt;
        &lt;td&gt;{{organizational.branch}}&lt;/td&gt;
              &lt;td&gt;{{organizational.name}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;button type="button" class="btn btn-default" ng-click="createSelectRowClick();"&gt;Select&lt;/button&gt;
  </code></pre>
  
  <p>This is my js code:</p>
  
  <pre><code>$scope.managers = [
   {name: 'Ana Faedo Iglesias'},
   {name: 'Cristina Menendez'},
   {name: 'Daniel Piriz'}
  ];
  
  $scope.selectedRow = null;
  
  $scope.setClickedRow = function(index){
      $scope.selectedRow = index;
  }
  $scope.createSelectRowClick = function(){
    if ($scope.selectedRow==null)
    {
      alert("Any rows selected");
    }
    else
    {
      //alert("valuetd" + value td column name, about click row);
    }
  }
  </code></pre>
  
  <p>NOTE: The table is in a modal window, if i click in table row, I recover the value of the column, i close the window modal, and after, i can put the column value wherever.</p>
  
  <p>How could do it? thanks,</p>