title: how to use two submit functions for update save form angular js
body: <p>I am using angular js for form save. after saved i loaded all data to the grid. data can edit using edit button. i am using two separate functions to save data. </p>
  
  <p>check my form</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form class="form-horizontal" ng-submit="saveEmpDetils(); update()"
        novalidate="novalidate"&gt;
      Name &lt;input type="text" ng-model="user.name"/&gt;
      Age  &lt;input type="text" ng-model="user.age"/&gt;
      City &lt;input type="text" ng-model="user.city"/&gt;
  
      &lt;button type="submit"&gt;Save&lt;/button&gt;
      &lt;button type="submit"&gt;Update&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>load data to the grid </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table datatable=""   id="empDetialTable" dt-options="dtOptions"
         dt-columns="dtColumns"  class="table table-bordered table-hover"&gt;
      &lt;thead&gt;
          &lt;tr&gt;      
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Age&lt;/th&gt;
              &lt;th&gt;City&lt;/th&gt;
              &lt;th class="text-center"&gt;Action&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr ng-repeat="employer in employerDetailList"&gt;
              &lt;td&gt;{{employer.name}}&lt;/td&gt;
              &lt;td&gt;{{employer.age}}&lt;/td&gt;
              &lt;td&gt;{{employer.city}}&lt;/td&gt;
              &lt;td data-title="'Action'" class="text-center"&gt;
                  &lt;div class="btn-group-xs"&gt;                       
                      &lt;a ng-click="editUser(employer)" target="_self"
                         class="btn btn-flat btn-xs btn-primary"
                         data-toggle="tooltip"
                         data-placement="bottom" title="Edit" tooltip&gt;
                          &lt;i class="ion ion-edit"&gt;&lt;/i&gt;
                      &lt;/a&gt;
              &lt;/td&gt;                       
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>when i click edit button, data loaded to the form. i done it. when click the edit, save button should hide and update button should show. after click the update button, update function should only submit. how i do it. </p>