Skip to content

Commit

Permalink
Updated README with a more elaborate basic example
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDuc committed Sep 13, 2017
1 parent d9e86e4 commit 1f93eeb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,27 @@ following characters (order is not important). All options default to `false`:
* n (add the event listener outside the `NgZone`)
* s (stop the event from bubbling any further and preventing default)

Basic example:
### Basic example:

Add the `NgEventOptionsModule` to your `AppModule`:

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgEventOptionsModule
],
providers: [],
bootstrap: [
AppComponent
]
})
export class AppModule {
}

And you'll be able to do something like this:

<button (click*)="onClick($event)" click.pcon>Click</button>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "ng-event-options",
"description": "Enable event options (capture, passive, ...) inside angular templates",
"main": "index.js",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",
"typings": "index.d.ts",
"engines": {
Expand Down

0 comments on commit 1f93eeb

Please sign in to comment.