title: how update the variable on button click?
body: <p>could you please tell me how to update the variable on button click ?Actually I have three variable first ,lastname and fullname .on Button click I change lastname But it not reflect on model ? Could I used digest or watch function ?</p>
  
  <pre><code>var loginCntrl=function($scope){
    $scope.testClick =function(){
      alert('sss');
      $scope.lastname="kumar";
       $scope.watch(function($scope){
         return $scope.name;
       }, function($scope){
         return $scope.name;
       })
  
    }
  
  $scope.name="naveen";
  $scope.lastname="sharam";
  $scope.fullname=$scope.name+$scope.lastname;
  }
  </code></pre>