Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gion/angular-eat-event
An angularjs directive that hijacks events on the targeted dom element and prevents the default action
https://github.com/gion/angular-eat-event
Last synced: 5 days ago
JSON representation
An angularjs directive that hijacks events on the targeted dom element and prevents the default action
- Host: GitHub
- URL: https://github.com/gion/angular-eat-event
- Owner: gion
- Created: 2015-09-21T14:12:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-21T14:54:14.000Z (about 9 years ago)
- Last Synced: 2024-10-11T12:39:44.570Z (about 1 month ago)
- Homepage:
- Size: 251 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
angular-eat-event
====================An angularjs directive that hijacks events on the targeted dom element, prevents the default action (`preventDefault()`) and stops the propagation (`stopPropagation()`).
##usage:
* download the script:
* [download](https://github.com/gion/angular-eat-event/releases/tag/0.1.0)
* [clone](https://github.com/gion/angular-eat-event.git)
* or use [bower](http://bower.io) (`bower install --save angular-eat-event`)
* include the script into your app:```html
```
* add the `eatEvent` module as a dependency to your angular app
```javascript
angular.module('myFancyApp', ['eatEvent']);
```
* use the directive in your views:
*
```html
// don't leave the page on anchor click:
never leave me!!!
```
or```html
// prevent multiple events:
You shall not type!```