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 🙏

© 2026 – Pkg Stats / Ryan Hefner

angular-ng-popup-modal

v0.0.9

Published

A lightweight, configurable, and developer-friendly popup modal for Angular applications. Built using **Angular CLI v15.1.0**, this modal component helps you plug clean confirmation dialogs into your app without any hassle.

Readme

Angular Modern Popup Modal

A lightweight, configurable, and developer-friendly popup modal for Angular applications. Built using Angular CLI v15.1.0, this modal component helps you plug clean confirmation dialogs into your app without any hassle.

🚀 Features

✨ Flexible & Dynamic

  • Create modals dynamically using ViewContainerRef.
  • Fully customizable text, labels, icons, and colors.

🧩 Rich Input Options

  • Supports plain text or HTML content.
  • Optional dropdown, remarks box, and address list.
  • Show/hide confirm or cancel buttons based on your use case.

🎨 Clean & Responsive UI

  • Comes with built-in icons and color customization.
  • Choose modal size: small, medium, or large.

🧲 Simple & Predictable Outputs

  • Emits confirmation status.
  • Emits selected values or address details when required.

♻️ Reusable Across Your App

  • Packaged as an npm library → easy to plug into any Angular project.

📦 Installation

npm install angular-ng-popup-modal

🔧 Usage Example

Import the modal component:

import { NgPopupModalComponent } from 'sparc-popup-modal';

Template:

<ng-template #confirmationPopUp></ng-template>

Trigger modal:

@ViewChild('confirmationPopUp', { read: ViewContainerRef }) container!: ViewContainerRef;

showPopUp() {
  this.container.clear();
  const compRef = this.container.createComponent(NgPopupModalComponent);

  compRef.instance.popupHead = 'Confirmation';
  compRef.instance.confrmText = 'Text';
  compRef.instance.confirmLable = 'Proceed';
  compRef.instance.cancelLable = 'Cancel';

  compRef.instance.getConfirmStatus.subscribe((result: any) => {
    if (result === 'Y') {
      // user confirmed
    } else {
      // user cancelled
    }
    compRef.destroy();
  });
}

🎛️ Inputs & Outputs

Inputs

| Input | Description | | | | -------------------- | ------------------------------ | -------- | -------- | | popupHead | Popup header title | | | | confrmText | Confirmation text | | | | textHTML | HTML content (SafeHtml) | | | | showHTML | Show HTML content (Y/N) | | | | confirmLable | Confirm button label | | | | cancelLable | Cancel button label | | | | confirmIcon | Icon for confirm button | | | | cancelIcon | Icon for cancel button | | | | contentIcon | Icon for modal content | | | | isVisible | Toggle popup visibility | | | | iconColor | Color of the icons | | | | showConfirmation | Show/hide confirm button | | | | showCancel | Show/hide cancel button | | | | addressList | Address list array | | | | showRemarks | Show remarks input | | | | showRemarksBtn | Show submit button for remarks | | | | showDropDown | Show dropdown menu | | | | dropdownname | Dropdown label | | | | dropDownValues | Dropdown options | | | | isDropDownDisabled | Enable/disable dropdown | | | | selectedValue | Selected dropdown value | | | | popupWidth | Modal width: 'small' | 'medium' | 'large' |

Outputs

| Output | Description | | ------------------ | ------------------------------ | | getConfirmStatus | Emits 'Y' or 'N' | | getAddress | Emits selected address details |

🖼️ Screenshots

Popup Modal Example 1

Popup Modal Example 2

Popup Modal Example 3

Popup Modal Example 4

Popup Modal Example 5

📤 Publishing

ng build angular-ng-popup-modal
cd dist/angular-ng-popup-modal
npm publish

🧪 Running Unit Tests

ng test angular-ng-popup-modal