0

Here is the code script:

'http://jsfiddle.net/NfPcH/652/'

I want that when "Edit" button is clicked then show text box in edit mode and change the button text from "Edit" to "Update", and i want that when i click on "Update" then data in text box should be submitted.

Thanks.

4

1 回答 1

0

这是您问题的更新版本的链接。HTML部分:

    <h4>Angular-xeditable Trigger manually (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
  <span editable-text="user.name" e-form="textBtnForm" buttons="no">
    {{ user.name || 'empty' }}
  </span>
  <button class="btn btn-default" ng-hide="textBtnForm.$visible" ng-click="textBtnForm.$show()" >
    edit
  </button>
  <button type="submit" class="btn btn-default" ng-show="textBtnForm.$visible" ng-click="save()" >
    update
  </button>
</div>
于 2014-04-13T17:54:39.750 回答