Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@agilie/ng2-dialog-window
Advanced tools
Dialog window module which allows to open dialog window using custom components. Any data could be easily send to component.
To install this module, run:
$ npm install @agilie/ng2-dialog-window --save
import { NgModule } from '@angular/core';
import { YourDialogWindowComponent } from './component/path'
import { AppComponent } from './app.component'
import { Ng2ModalWindowModule, Ng2DialogWindowService } from 'ng2-dialog-window';
@NgModule({
imports: [
// ...
Ng2ModalWindowModule
],
declarations: [
AppComponent,
// ....
YourDialogWindowComponent
],
providers: [
//...
Ng2DialogWindowService
],
//...
entryComponents: [
YourDialogWindowComponent
],
})
export class AppModule {
}
import { Component, ViewContainerRef } from '@angular/core';
import { Ng2DialogWindowService } from 'ng2-dialog-window';
import { YourDialogWindowComponent } from './component/path'
@Component({
selector: 'app-component',
template: '<button (click)="openModal()">Open modal</button>'
})
export class AppComponent {
constructor( private dialog: Ng2DialogWindowService, private viewContainer: ViewContainerRef) {
}
openModal() {
this.dialog.openModal(this.viewContainer, {component: YourDialogWindowComponent})
}
}
You need to extend your dialog component from Ng2DialogWindowComponent
to inherit base methods of dialog window and wrap your template in ng2-dialog-window-component
tag to extend dialog window base styles.
It seems like Angular doesn't provide any simple way to inherit styles from another component. Feel free to create an issue ticket if you think I am wrong.
import { Component } from '@angular/core';
import { Ng2DialogWindowComponent } from 'ng2-dialog-window'
@Component({
selector: 'my-dialog-window',
template: '<ng2-dialog-window-component><!-- Body of dialog window --></ng2-dialog-window-component>'
})
export class YourDialogWindowComponent extends Ng2DialogWindowComponent {
}
Here is the list of accessible methods that you can use:
Ng2DialogWindowService
.openModal(viewContainerRef, options)
Method allows to open dialog window. It creates new dialog instance on each call. It accepts viewContainerRef of component and options object as arguments.
viewContainerRef {viewContainerRef}
- viewContainerRef of component from which you call openModal
method
options
component {Component}
- dialog window component
data {String} | {Object} | {Array}
- any serializable data that you want to be stored in dialog component and be available from dialogData
.
close()
- extended method from base dialog component. Closes dialog window.
Problems? Check the Issues block to find the solution or create a new issue that we will fix asap. Feel free to contribute.
This Angular module is open-sourced by Agilie Team info@agilie.com
Maks Nechesonov - maks.nechesonov@agilie.com
The MIT License (MIT) Copyright © 2017 Agilie Team
FAQs
Modal dialogs and popups module for Angular applications
The npm package @agilie/ng2-dialog-window receives a total of 2 weekly downloads. As such, @agilie/ng2-dialog-window popularity was classified as not popular.
We found that @agilie/ng2-dialog-window demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.