Hi folks,
I use Ionic, v1.0.0-beta.13 for my hybrid app. I’ve noticed a potential bug with ng-click.
My html file
<ion-view title="{{name}}">
<ion-content has-header="true" padding="true">
<img ng-src="{{image}}"></img>
<label class="item item-input">
<span class="input-label">Name: </span>
<input type="text" ng-model="name" placeholder="Name">
</label>
<button class="button button-clear button-energized button-medium icon-left ion-ios7-trash" ng-click="delete()">Delete</button>
<button class="button button-clear button-energized button-medium icon-left ion-ios7-checkmark" ng-click="update()">Update</button>
</ion-content>
</ion-view>
If I click on the Delete button, the delete() function execute. Good !
If I click on the Update button, the delete() function execute too. Bad !
If I swap the 2 button tags in the html file, the behavior is the opposite.
In summary, the first declared ng-click is always fired even I click on the second button !
Does anyone has the same issue ? has solved it ?
Thank you for your answer.