How to prevent event (link) while the child event is fired

I am trying to stop an event that when we click the child event it will not fire the parent event.

Here's my code :

<div class="card">
  <div class="item item-divider">Choose 3 favorite player</div>
    <ion-item class="item-button-right" ng-repeat="player in dataService.playerlist" item="item" ng-href="#/tab/chat">{{player.name}}
      <div class="buttons">
      <button class="button button-assertive icon ion-android-favorite" ng-click="addToFavorite(player)"></button>
      </div>
    </ion-item>
</div>

Here's my real case : http://codepen.io/harked/pen/WvJQWp

What i want to do is : When we click item(player), it will go to 'Player Detail pages', but when we click favorite button, it will only show alert and add player to favorites but not go to 'Player Detail pages'.

I've already add item.stopPropagation(); or event.stopPropagation(); but still didnt work.

Any advice? It would be greatly appreciated.

The item is not an event, in this case. You also want to use event.preventDefault() as well, I believe. To get the event from the ng-click you need to add the $event to the arguments like the following bit of code (from your example):

<button class="[...]" ng-click="addToFavorite($event, player)"></button>

Then in your handler add the $event and use preventDefault():

$scope.addToFavorite = function ($event, item) {
  alert("One Player Added Succesfully!");
  User.favorites.unshift(dataService.playerlist.indexOf(item));
  $event.preventDefault();
}

Updated codepen

You need to pass the $event object to the ng-click function callback and use the $event.stopPropagation() method to stop the propagation of the click event to the parent.

Here is the HTML code adjustment:

<div class="buttons"> 
  <button class="button button-assertive icon ion-android-favorite" ng-click="addToFavorite(player, $event)"></button>
</div>

Here is the JS code adjustment inside your ChooseTabCtrl controller:

  $scope.addToFavorite = function (item, $event) {
      alert("One Player Added Succesfully!");
      User.favorites.unshift(dataService.playerlist.indexOf(item));
      $event.stopPropagation();
  }

Regards,