title: Fill a form ng-click Angular js issue
body: <p>I am developing an application with angular js, I have a table in each row there is an edit button and above the table there is a form, what I need to do is that when user clicks on a specific row then form will be filled with data of that row</p>
  
  <p>Here is my code of form</p>
  
  <pre><code>   &lt;form role="form" ng-controller="userController" &gt;
  
     &lt;div class="form-group"&gt;
        &lt;label&gt;Name&lt;/label&gt;
        &lt;input type="text" class="form-control" ng-model="currentUser.name"/&gt;
        &lt;label&gt;Description&lt;/label&gt;
        &lt;input type="text" class="form-control" ng-model="currentUser.Description"/&gt;
     &lt;/div&gt;             
  </code></pre>
  
  <p>Here is the code of table:</p>
  
  <pre><code>   &lt;table class="table" id="user-table" &gt;
  
          &lt;tr ng-repeat="user in users"&gt;
            &lt;td&gt;
                {{ user.id }}
            &lt;/td&gt;            
            &lt;td&gt;
                {{ user.name }}
            &lt;/td&gt;
            &lt;td&gt;
                {{ user.Description }}
            &lt;/td&gt;
            &lt;td&gt;
                &lt;a ng-click="setCurrentUser(user.id)" class="glyphicon glyphicon-pencil"&gt;&lt;/a&gt;
            &lt;/td&gt;                
         &lt;/tr&gt;           
  
     &lt;/table&gt;   
  </code></pre>
  
  <p>In the javascript file in the userController I have the following code</p>
  
  <pre><code>     $scope.setCurrentUser= function( id ){         
  
           $scope.currentUser = $scope.users[id];
            console.log($scope.currentUser);
  
         }
  </code></pre>
  
  <p>My question is this : Although when I click on the rows the setCurrentUser is run and the object currentUser is printed properly in the console, why the form is not get filled witht the data of $scope.currentUSer
  where am I making mistake, or should I just take another approach to handle it?</p>