0.4.1 • Published 5 years ago

ngx-spreadmodal v0.4.1

Weekly downloads
26
License
MIT
Repository
github
Last release
5 years ago

NgxSpreadmodal

If you need a modal that takes up whole screen, this modal does that with some neat extra features.

DEMO

Use it like this

In your component HTML file

<ngx-spreadmodal #spread>
Modal content goes here
</ngx-spreadmodal>


<button (click)="openModal()">Open Modal</button>
<button (click)="closeModal()">Close Modal</button>

In your component class

import { Component, ViewChild} from '@angular/core';
import { NgxSpreadmodalComponent } from 'ngx-spreadmodal';

export class AppComponent {
  
  @ViewChild('spread') spread:NgxSpreadmodalComponent;

  openModal(){
    this.spread.openModal();
  }

  closeModal(){
    this.spread.closeModal();
  }
  }

To act upon modal animation completion use promise.

  openModal(){
    this.spread.openModal().then(() =>{
      console.log('modal opened');
    });
  }

  closeModal(){
    this.spread.closeModal().then(()=>{
      console.log('modal closed');
    });
  }
0.4.1

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.1

6 years ago