
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
modal-popup-angular-14
Advanced tools
This project demonstrates how to implement modal popups in an Angular application using the `modal-popup-angular-14` package.
This project demonstrates how to implement modal popups in an Angular application using the modal-popup-angular-14
package.
To install the modal-popup-angular-14
package, run the following command:
npm i modal-popup-angular-14@latest
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ModalPopUpModule } from 'modal-popup-angular-14';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
declarations: [
AppComponent,
Test1Component,
],
imports: [
BrowserModule,
AppRoutingModule,
ModalPopUpModule,
BrowserAnimationsModule
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule { }
interface ModalOptions {
title?: string;
body?: string;
data?: any;
size?: {
minWidth?: string;
width?: string;
maxWidth?: string;
minHeight?: string;
height?: string;
maxHeight?: string;
};
}
import { Component } from '@angular/core';
import { Test1Component } from './test1/test1.component';
import { ModalService } from 'modal-popup-angular-14';
import { ReactiveJsonFormsService } from 'json-reactive-form-angular-14';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
title = 'angular-tour-of-heroes';
constructor(public modal: ModalService) { }
OpenPopUp() {
this.modal.open(Test1Component, { title: "Test Compoments", body: "kaise hoo Aap", data: {} })
}
}
<!-- Get Data Test1Component used MODAL_DIALOG_DATA -->
import { Component, OnInit } from '@angular/core';
import { ModalService,DATA_MODAL_DIALOG_DATA } from 'modal-popup-angular-14';
@Component({
selector: 'app-test1',
templateUrl: './test1.component.html',
styleUrls: ['./test1.component.scss']
})
export class Test1Component implements OnInit {
constructor(public modal: ModalService, @Inject(DATA_MODAL_DIALOG_DATA) public modalData: any) { }
ngOnInit(): void {
console.log(this.modalData, "DATA_MODAL_DIALOG_DATA")
}
}
You can view and run the example project live on StackBlitz: link.
FAQs
This project demonstrates how to implement modal popups in an Angular application using the `modal-popup-angular-14` package.
The npm package modal-popup-angular-14 receives a total of 3 weekly downloads. As such, modal-popup-angular-14 popularity was classified as not popular.
We found that modal-popup-angular-14 demonstrated a healthy version release cadence and project activity because the last version was released less than 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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.