title: How to disable button click until item selected/activated?
body: <p>Trying to disable button in table. and enable it only when item selected/clicked/activated</p>
  
  <p>button code </p>
  
  <pre><code>&lt;td&gt;&lt;a class="btn btn-info" ng-disabled="isDisabled"&gt;Edit&lt;/a&gt;&lt;/td&gt; 
  </code></pre>
  
  <p>disabled bool
      <code>$scope.isDisabled = false;</code></p>
  
  <p>trying to enable button only when selected is true</p>
  
  <pre><code>$scope.selectedRow = false; // initialize our variable to null
  $scope.setClickedRow = function(index) { //function that sets the value of selectedRow to current index
      $scope.selectedRow = index;
      $scope.isDisabled = true;
  } 
  </code></pre>
  
  <p>any help please?
  <a href="http://plnkr.co/edit/llmcbXCA93kuTVTzpQlm?p=catalogue" rel="nofollow noreferrer">http://plnkr.co/edit/llmcbXCA93kuTVTzpQlm?p=catalogue</a></p>
  
  <p>the full table</p>
  
  <pre><code>&lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th class="hidden-xs"&gt;ID&lt;/th&gt;
                      &lt;th&gt;Name&lt;/th&gt;
                      &lt;th&gt;Date&lt;/th&gt;
                      &lt;th&gt;Grade&lt;/th&gt;
                      &lt;th&gt;Subject&lt;/th&gt;
                      &lt;th&gt;&lt;/th&gt;
                  &lt;/tr&gt; 
                &lt;/thead&gt;
                &lt;tbody&gt;
                        &lt;tr ng-repeat="trainee in trainees | filter: search" ng-class="{'selected':$index == selectedRow}" ng-click="setClickedRow($index)"&gt;
                          &lt;td class="hidden-xs"&gt;{{$index+1}}&lt;/td&gt;
                          &lt;td&gt;{{trainee.name}}&lt;/td&gt;
                          &lt;td&gt;{{trainee.date | date:'d/M/yyyy'}}&lt;/td&gt;
                          &lt;td&gt;{{trainee.grade}}&lt;/td&gt;
                          &lt;td&gt;{{trainee.subject}}&lt;/td&gt;
                          &lt;td&gt;&lt;a class="btn btn-info"&gt;Edit&lt;/a&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                      &lt;/tbody&gt;
              &lt;/table&gt;
  </code></pre>