Check out example codes for "prevent the child event from triggering the parent element angular 5". It will help you in understanding the concepts better.

Code Example 1

Use the stopPropagation method on the angular $event object:

<div ng-click="parent()">
  <div ng-click="d(); $event.stopPropagation();"></div>
</div>

Learn ReactJs, React Native from akashmittal.com