title: How to invoke multiple functions/chained calls using ng-click
body: <p>Hi I have a button that fires off two functions like so. Is there a way for the updateDetails to run only after changeColor has finished? The updateDetails is currently pulling an old configuration with the old color, and not the changed color.</p>
  
  <pre><code>ng-click="changeColor(color.code); updateDetails()"
  </code></pre>
  
  <p>Here is the view:</p>
  
  <pre><code>&lt;div ng-controller="ColorsCtrl"&gt;
    &lt;div ng-controller="HeaderCtrl"&gt;
      &lt;div byo-header&gt;
      &lt;/div&gt;
  
      &lt;div ng-repeat="color in colors" class="row"&gt;
        &lt;div class="small-12 columns"&gt;
              &lt;div ng-controller="ButtonsController"&gt;
                  &lt;div class="button-group"&gt;
                {{ isSelected(color.code) }}
                  &lt;button ng-click="changeColor(color.code); updateDetails()" type="radio" class="button" ng-model="selectedColor" btn-radio="color.code"&gt;{{color.name}}&lt;/button&gt;
              &lt;/div&gt;
              &lt;/div&gt;  
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;br/&gt;
      &lt;br/&gt;
      &lt;div class="row"&gt;
          &lt;div class="small-4 small-offset-4 columns"&gt;
          &lt;!-- Proceed to packages if available --&gt;
              &lt;a ng-if="hasPackage" href="#/packages/{{modelCode}}" class="button"&gt;Packages&lt;/a&gt;
          &lt;!-- Proceed to options if packages not available --&gt;
          &lt;a ng-if="!hasPackage" href="#/options/{{modelCode}}" class="button"&gt;Options&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;    
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is changeColor() in the ColorsCtrl:</p>
  
  <pre><code>$scope.changeColor = function(newColorCode){
          //swap previous selected color with new
          configuratorService.addOption($scope.modelCode, newColorCode, function(configuration){
              $scope.configuration = configuration;               
          });
  
      }
  
    }
  </code></pre>
  
  <p>Here is updateDetails in the HeaderCtrl</p>
  
  <pre><code>    $scope.updateDetails = function(){
          $scope.summaryDetails = getSummaryDetails();
      }
  </code></pre>