
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Angular 7 Modal
npm install a4-modal
ModalModule
to imports of the app.module.ts
.
...
import { ModalModule } from 'a4-modal';
...
@NgModule({
declarations: [
AppComponent
],
imports: [
...,
ModalModule,
...
],
...
})
viewContainerRef: ViewContainerRef
to the constructor of app.component.ts
....
import { ViewContainerRef } from '@angular/core';
...
constructor(private viewContainerRef: ViewContainerRef) { }
modalService: ModalService
to the constructor of your component.constructor(private modalService: ModalService) { }
this.modalService.open(MyModalContentComponent)
.then(p=> console.log(p)) // the result of the modal
.catch(p=> console.error(p)); // when route changes
MyModalContentComponent
will be dynamically created by the modal service. You will need to add MyModalContentComponent
to the entryComponents
in your module.@NgModule({
imports: [
...
],
declarations: [
...
],
providers: [
...
],
entryComponents: [
MyModalContentComponent
]
...
import { ModalComponent, IModal } from 'a4-modal';
...
export class MyModalComponent implements IModal {
...
modal: ModalComponent;
...
closeModal() {
this.modal.close();
}
...
}
FAQs
Handle modal related tasks
The npm package a4-modal receives a total of 3 weekly downloads. As such, a4-modal popularity was classified as not popular.
We found that a4-modal 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.