New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

standard-dialogs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

standard-dialogs

A Library that uses the Angular Material Framework for providing standard dialog implementations

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Standard Dialogs

A Library that uses the Angular Material Framework for providing standard dialog implementations

Installation

You can install Standard Dialogs through npm

npm install --save @lloydaf/standard-dialogs

Usage

After installing the package, make sure you import the module in the module you want to use this in.

For example, in app.module.ts,

...
import { StandardDialogsModule } from "@lloydaf/standard-dialogs";
...
@NgModule({
  imports: [StandardDialogsModule],
})
export class  AppModule{}

Dialogs

Currently provides three Dialog Implementations.

  • Alert Prompt: This Dialog is used to alert the user or provide a message to the user. Can be used through AlertPromptService(see open() method).
  • Confirm Prompt: This Dialog is used to get a confirmation action from the user. Can be used through ConfirmPromptService(see open() method).
  • Custom Prompt: This Dialog is used to provide a custom functionality not implemented through the standard Dialogs. Can be used through CustomPromptService(see open()) method.

Using Dialogs

...
constructor(
    private confirmService: ConfirmPromptService 
    // inject as you normally inject a service
  ) 
...
openConfirmPrompt(){
    this.confirmService.setContent('Are you sure you want to remove this category?');
    this.confirmService.setTitle('Remove Category');
    this.confirmService.open();
}
...

Buttons

Currently provides three Button Implementations

  • Yes Button: This Button returns true when clicked, default text "Yes".
  • No Button: This Button returns false when clicked, default text "No".
  • Custom Button: This Button is used to provide a custom Button functionality not implemented through the standard Buttons. Needs to be built using ButtonBuilder.

Using Buttons

...
let yesButton = new YesButton();
let customButton = new ButtonBuilder().text('Hi').val('Bye').build();

FAQs

Package last updated on 01 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts