angular-xeditable onsave event

308 views Asked by At

I am using angular package angular-xeditable the problem is I want to call its event onaftersave after i edit the label here is my html:

<h4 >{{ title.key || 'empty' }} 
  <span   onaftersave="save()"  editable-text="title.key ">
  <i class="fa fa-pencil-square-o" "></i></span>
</h4>

the event onaftersave is called even if i click on the edit button and also while typing in the field

what I want is to call the event only when I click the button

1

There are 1 answers

0
Dixit On

Try to use this code this will helps to prevent function call.

<span>
<a onaftersave="save();" data-ng-model="title.key" e-placeholder="Your text" editable-text="title.key">
<span>{{title.key || 'empty'}}</span>
</a>
</span>