npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ngx-popups

v1.2.0

Published

Angular 5+ popups

Readme

npm version

NPM

ngx-popups

Popups for angular 5+ : load dynamically your components into a popup. Minimal style and html for easy personalization. This library use ngx-dom-component. Moreover to be compatible with internet explorer and edge you could be interested to use events-polyfill, because ngx-popups use 'once' property of addEventListener.

See example/ if needed.

Install

npm install --save ngx-popups ngx-dom-component events-polyfill
@NgModule({
    providers: [NgxPopupModule],
    declarations: [ /* Put here your components to be injected */ ],
    entryComponents: [ /* Put here your components to be injected */  ],
})
export class AppModule { }

And put <ngx-popups></ngx-popups> into your main component template.

Into your SystemJs config you'll need to put :

packages: {
    'ngx-popups', {
		main: 'path_to/ngx-popups.js',
		defaultExtension: 'js'
	},
	'ngx-dom-component', {
		main: 'path_to/ngx-dom-component.js',
		defaultExtension: 'js'
	}
}

Style (scss or css)

This package comes with a minimal style that you can include with :

@import 'node_modules/ngx-popups/style';

or

<link rel="stylesheet" type="text/css" href="/node_modules/ngx-popups/style.css">

Documentation

NgxPopupService

open

open(config: IPopupConfig, waitTransitionEnd: boolean = true, detail?: any, managerId?: string): Promise<NgxPopupComponent>

Opens a new popup and inject a component inside. Returns a promise resolved when the popup is opened.

config :

{
    componentType: any; // the component to inject
    inputs?: { [key: string]: any; }; // the inputs to pass to the component
    outputs?: { [key: string]: Function;}; // the outputs to listen to the component
}

waitTransitionEnd (default true) : if true wait the end of the animation before triggering open/resolving promise. detail : provide data to the detail property of the custom event open. managerId : in case of many managers, you can provide a specific manager id.

close

close(popup: NgxPopupComponent, waitTransitionEnd: boolean = true, detail?: any): Promise<void>;

Closes a popup. Returns a promise resolved when the popup is closed.

closeAll

closeAll(managerId?: string): Promise<void>;

Closes all popups. Returns a promise resolved when all popups are closed.

NgxPopupComponent

close

close(waitTransitionEnd: boolean = true, detail?: any): Promise<void>

Closes the popup. Returns a promise resolved when the popup is closed.

contentInstance

 readonly contentInstance: any;

Returns the instance of the injected component.

element

readonly element: HTMLElement;

Returns the DOM element of the popup (can be use to add class, etc...).

closable

get/set closable: boolean;

Allow/Disallow close for the popup.

backgroundClosable

get/set backgroundClosable: boolean;

Allow/Disallow close for the popup when clicking on the background.

EventTarget The NgxPopupComponent inherits of all methods of EventTarget. It includes :

  • addEventListener
  • dispatchEvent
  • removeEventListener

The following events are available :

  • close : after the popup is closed (including transition or not, according to 'waitTransitionEnd').
  • beforeclose : when the close method is called. Use event.preventDefault() to cancel close.
  • cancelopen : when an open is cancelled (ex: while animating, the popup is in a 'opening' state, if you call close before animation is complete, it cancels the open).

All of them are CustomEvent, with a detail property that you can set when calling open or close.