File

src/app/shared/components/modal/modal-abstract.ts

Index

Properties
Methods

Constructor

constructor(modalRef: BsModalRef)

Constructor

Parameters :
Name Type Optional Description
modalRef BsModalRef

Methods

Public cancel
cancel()

Close the modal

Returns : void
open
open(args: )

Init the modal

Parameters :
Name Type Optional Description
args
Returns : Observable<any>

Properties

Private _modalRef
_modalRef:

Reference modal

import { BsModalRef } from 'ngx-bootstrap';
import { Observable } from 'rxjs';

export abstract class Modal {

  /**
   * Reference modal
   */
  private _modalRef;

  /**
   * Constructor
   * @param {BsModalRef} modalRef
   */
  constructor(modalRef: BsModalRef) {
    this._modalRef = modalRef;
  }

  /**
   * Init the modal
   */
  abstract open(args): Observable<any>;

  /**
   * Close the modal
   */
  public cancel() {
    this._modalRef.hide();
  }

}

results matching ""

    No results matching ""