Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ngx-popups
Advanced tools
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.
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'
}
}
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">
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.
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 :
The following events are available :
All of them are CustomEvent
, with a detail
property that you can set when calling open
or close
.
FAQs
Angular 5+ popups
The npm package ngx-popups receives a total of 44 weekly downloads. As such, ngx-popups popularity was classified as not popular.
We found that ngx-popups 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.