Angular 4+ Popovers
Last updated 3 years ago by david.anderson .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install gist-angular-popovers 
SYNC missed versions from official npm registry.



The Gist-popover is a structural angular 2 directive that turns an HTML element into a popover. Structural directives have the limitation of being allowed only one input that is a string. Due to this, all inputs will be specified in the following way *gistPopover="'inputstring'". Not the single quotes wrapping inputstring, they are required. Optionally, you can data bind the input string via *gistPopover="myVar". Where myVar is defined in the views component. All Inputs are optional, and if omitted will be set to their defaults. If an invalid input string is given, an error will be thrown.


Target - Where to anchor the mouse

  • Ele -- default value
    • Popover will be anchored to side of element
  • Mouse
    • Popover will follow the mouse when the mouse is over the trigger element
  • X,Y - page coordinates
    • Popover will display at the X,Y coordinates given.
    • X and Y are relative from the top left visible corner
    • Useful if you need to click on the popover. Or don't have an element to anchor to ( map / canvas elements )

Position - what side of the target to show on

  • bottom -- default value
    • Popover will display below the target
  • top
    • Popover will display above the target
  • left
    • Popover will display to the left of the target
  • right
    • Popover will display to thr right of the target

isInteractive - Will the popover receive pointer events

  • false -- default
    • Mouse events will pass through the popover
  • true
    • Popover will capture mouse events

isVisible - control the popover display programically

  • undefined
    • Popover will display the mouse enters the trigger element, and hide when the mouse leaves it. If the popover is interactive, it will not hide while the mouse is over it
  • true
    • Popover will be visible
  • false
    • Popover will be hidden

Example Usage

<div *gistPopover="'target:ele; position:bottom; isVisible:true'">
    I will always display below my parent element
<div *gistPopover="isVisible:false'">
    I will never display
<div *gistPopover="componentBoundString">
    My inputs will be what ever the views component has set componentBoundString to
<div *gistPopover="'target:ele; position:left;'">
    I will display to the left of my parent element when you mouse over it
<div *gistPopover="'target:mouse; position:top;'">
    I will display above the mouse when you mouse over my parent element


  • Popovers are rendered as children of the gist-Popover-target instead of where you placed them ( look there in the dom inspector ). This takes care overflow issues. Nothing else about them is different though.
  • The popover will auto adjust its position to ensure that it does not go off of the page
  • The popover has hits height and width hard set when it toggles to being display. This ensures that it will not grow and shrink as it makes sure its on the page. This has the the side affect of meaning that 2 identical popovers can be different sizes. you can prevent this from applying your own styles to you popover

Demo Application

To see a working demo application run npm run start

Current Tags

  • 1.0.14                                ...           latest (2 years ago)

15 Versions

  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           3 years ago
  • 1.0.11                                ...           3 years ago
  • 1.0.10                                ...           3 years ago
  • 1.0.9                                ...           3 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 31
Dependents (0)

Copyright 2014 - 2016 © |