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.
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.
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 0 open source maintainers 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.