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 🙏

© 2024 – Pkg Stats / Ryan Hefner

custom-angular-dialog

v3.0.0

Published

This is a simple, easy, small, most customizable library for creating dynamic dialogs with angular. This can be easily handled by using a `boolean` with customizable header and body content.

Downloads

8

Readme

custom-angular-dialog

This is a simple, easy, small, most customizable library for creating dynamic dialogs with angular. This can be easily handled by using a boolean with customizable header and body content.

Installation

$ npm install custom-angular-dialog --save

Import DialogModule into your AppModule so that your app knows how to render <app-dialog>.

  import { DialogModule } from 'custom-angular-dialog';
  import { NO_ERRORS_SCHEMA } from "@angular/core";
...
imports:[
    ...
...
DialogModule,
...
],
schemas: [NO_ERRORS_SCHEMA]

Then your app should look something like this:

<button (click)="showDialog = !showDialog">Open</button>
<label>Your Fav : {{tDialog}}</label>
<!-- dialog content -->

<app-dialog [(visible)]="showDialog" [width]="20" [height]="20" [headerColor]="'#34a0e7'">
<dialog-header>Alert !</dialog-header>
<dialog-body>
  <input placeholder="Trending Dialog ?" [(ngModel)]="tDialog" type="text" />
  <button (click)="showDialog = !showDialog">Close</button>
</dialog-body>
</app-dialog>

<dialog-header> ,<dialog-body>

Both are optional and each can be used alone.

Any HTML tags including <img>, <input>, etc... can be included inside

Input parameters [width] and [height].

Both are optional parameters and is defaulted to 20% both of whole dialog.

The values should be in percentage(%).

Parameter [headerColor]

Color is defaulted to 34a0e7.

It can be used to set the color of Default header and the color can be in names, or RGB, HEX, HSL, RGBA, HSLA values.

Update 3.0.0.

<app-dialog [(visible)]="showDialog" [width]="20" [height]="20" [headerColor]="'#34a0e7'" [closable]=true [draggable]=false [anchored]=false [resizable]=false >
....
.....
......
</app-dialog>

Input parameters [closable] ,[draggable], [anchored], [resizable].

[closable] - It is property for default header. Close icon can be enabled and disabled using this parameter. Defaulted to true.

[draggable] - It is also a property of default header. Dialog can be dragged across the screen by dragging the header.It can be helpful when there is a need to read the contents below dialog window by moving it. Defaulted to false.

[anchored] - The dialog can be anchored to the screen and can only be closed by close icon or by [(visible)] parameter, it cannot be closed by clicking outside the dialog. It is useful when its mandatory to enter values or operations inside dialog. It will be effective when combnined with [closable]=false. Defaulted to false.

[resizable] - Dialog can be resized by dragging right corner of the dialog.Defaulted to true.

All above parameters are optional.Nested and multiple dialog is supported on and above 3.0.0 version.