title: re enabling ng-disabled button in Angular JS
body: <p>I am a newbie to AngularJS. I have created a form with fields which is disabled using <code>ng-disabled</code> by default. when I click on the edit <code>&lt;button&gt;</code> I want these fields to re-enable.</p>
  
  <p>HTML</p>
  
  <pre><code>  &lt;form class="form-horizontal" role="form" ng-submit="edit_setting()" ng-controller="ExchangeController"&gt;
      &lt;div class="form-group"&gt;
        &lt;label&gt;Name&lt;/label&gt;
        &lt;div class="col-sm-6"&gt;
          &lt;input type="text" class="form-control" ng-model="exchange_dt.name" ng-disabled="true"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
        &lt;label&gt;Host Name&lt;/label&gt;
        &lt;div class="col-sm-6"&gt;
          &lt;input type="text" class="form-control" ng-model="exchange_dt.host_name" required ng-disabled="true"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
        &lt;label&gt;Address&lt;/label&gt;
        &lt;div class="col-sm-6"&gt;
          &lt;input type="text" class="form-control" ng-model="exchange_dt.address" ng-disabled="true"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>  function ExchangeController($scope, $http, $cookieStore, $location) {
      var edit_exchange_setting = "https://pvbp.com/api/settings.html?contactid=292351&amp;exchange_id=7124&amp;clearinghouseid=1&amp;token=e5349652507c0esae86d50fdbdc53222cf97&amp;page=view";
        $http.get(edit_exchange_setting).success(function(response){
          $scope.exchange_dt.exchange_name = response.name;
          $scope.exchange_dt.exchange_host_name = response.host_name;
          $scope.exchange_dt.exchange_last_processed_date = response.address;   
        });
  
        $scope.edit_exchange_setting_click = (function(){
        // how can i make the fields re enable here
  
        });
    }
  </code></pre>