New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lukana/modals

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lukana/modals

Modals using only `@angular/cdk` as dependencies.

latest
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

Lukana modals

Modals using only @angular/cdk as dependencies.

Usage

  • Add @lukana/modals/scss/modal to Your style.scss file or use Your own styles.

  • Import ModalsModule as dependency.

  • Add modals content component to entryComponents

  • Inject ModalService as dependency in You component, and open modal with command ModalService.open(YourComponent):

    @Component({
      selector: 'app-page',
      templateUrl: './app-page.component.html'
    })
    export class AppPageComponent implements OnInit {
    
      constructor(private modalService: ModalService) {
      }
    
      ngOnInit() {
      }
    
      onOpenModal() {
        const dataPassedDoComponent = {name: 'Hello'};
        this.modalService.open(ModalContentComponent, dataPassedDoComponent)
          .subscribe(resp => console.log('returned', resp));
      }
    }
    
  • In modal component You can Inject ModalService and close modal with return value like this:

    
    @Component({
      selector: 'lukana-modal-content',
      templateUrl: './modal-content.component.html',
      styleUrls: ['./modal-content.component.css']
    })
    export class ModalContentComponent implements OnInit {
      name: string;
      constructor(private modalService: ModalService) {
      }
    
      ngOnInit() {
      }
    
      onClose() {
        this.modalService.close('returnValue');
      }
    }
    

Keywords

modal

FAQs

Package last updated on 31 Jan 2023

Did you know?

Socket

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.

Install

Related posts