ngx-propagation-stop
TypeScript icon, indicating that this package has built-in type declarations

2.0.29 • Public • Published

npm version Build Status Commitizen friendly Renovate enabled codecov FOSSA Status

ngx-propagation-stop

A npm-packet for a stopping Click Event Propagation.

Installation

Install from NPM

$ npm install ngx-propagation-stop --save

Do not forget to add it to your app.module.ts:

import { PropagationStopModule } from 'ngx-propagation-stop';

@NgModule({
  imports: [
    PropagationStopModule
  ]
})

How to use

Just add the propagationStop directive to your element and the outer elements click event wont get triggered.

<div (click)="outerElementClicked()">
    <div propagationStop (click)="innerElementClicked()"></div>
</div>

Thanks to

This project is based on a StackOverflow answer: https://stackoverflow.com/questions/35274028/stop-mouse-event-propagation-in-angular

License

FOSSA Status

Readme

Keywords

Package Sidebar

Install

npm i ngx-propagation-stop

Weekly Downloads

119

Version

2.0.29

License

MIT

Unpacked Size

75.8 kB

Total Files

24

Last publish

Collaborators

  • danielhabenicht