Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFrankel committed Mar 8, 2018
2 parents cfd5c40 + eb58362 commit 6058106
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[![npm](https://img.shields.io/npm/v/ngx-popper.svg?style=flat-square)](https://www.npmjs.com/package/ngx-popper)
[![npm](https://img.shields.io/npm/dm/ngx-popper.svg?style=flat-square)](https://www.npmjs.com/package/ngx-popper)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/MrFrankel/ngx-popper/blob/master/LICENSE)

<img src="http://badge-size.now.sh/https://unpkg.com/[email protected]/ngx-popper.js?compression=brotli" alt="Stable Release Size"/>
<img src="http://badge-size.now.sh/https://unpkg.com/[email protected]/ngx-popper.js?compression=gzip" alt="Stable Release Size"/>

ngx-popper is an angular wrapper for the [Popper.js](https://popper.js.org/) library.

Expand Down Expand Up @@ -119,8 +120,24 @@ SystemJS
(popperOnShown)="onShown($event)">
</div>
```

7. hide/show programmatically:
```HTML
<div [popper]="tooltipcontent"
[popperTrigger]="'hover'"
[popperPlacement]="'bottom'">
<p class="bold">Pop</p>
<p class="thin">on the bottom</p>
</div>
<popper-content #tooltipcontent>
<div>
<p>This is a tooltip with text</p>
<span (click)="tooltipcontent.hide()">Close</div>
</div>
</popper-content>
```

7. Attributes map:
8. Attributes map:

| Option | Type | Default |
|:------------------- |:---------------- |:-------- |
Expand All @@ -133,18 +150,18 @@ SystemJS
| popperPlacement | Placement(string) | auto |
| popperTarget | HtmlElement | auto |
| popperBoundaries | string(selector) | undefined|
| popperShowOnStart | number | 0 |
| popperShowOnStart | boolean | false |
| popperTrigger | Trigger(string) | hover |
| popperPositionFixed | boolean | false |
| popperHideOnClickOutside | boolean | true |
| popperHideOnScroll | boolean | false |
| popperForceDetection | boolean | false |
| popperTrigger | Trigger(string) | hover |
| popperModifiers | popperModifier | undefined|
| popperOnShown | EventEmitter<void>| $event |
| popperOnHidden | EventEmitter<void>| $event |

8. Override default
9. Override defaults:

Ngx-popper comes with a few default properties you can override in default to effect all instances
These are overridden by any child attributes.
```JavaScript
Expand Down Expand Up @@ -172,7 +189,7 @@ NgModule({
| hideOnClickOutside | boolean | true |
| hideOnScroll | boolean | false |

9. popperPlacement:
10. popperPlacement:

| 'top'
| 'bottom'
Expand All @@ -193,7 +210,7 @@ NgModule({
| 'auto-right'
| Function

10. popperTrigger:
11. popperTrigger:

| 'click'
| 'mousedown'
Expand Down

0 comments on commit 6058106

Please sign in to comment.