File

dev-kit/src/click-stop-propagation/click-stop-propagation.directive.ts

Description

Prevent click event from bubbeling.

Example usage

Example :
<!-- If `<span>` is clicked, its direct click handler `clickHandler()` will be triggered, while `parentClickHandler()` won't.  -->
<div (click)="parentClickHandler()">
  <span (click)="clickHandler()" clickStopPropagation><span>
</div>

Import

Example :
import { ClickStopPropagationDirective } from '@talenra/components/dev-kit';

Metadata

results matching ""

    No results matching ""