Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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!

```