@ng-bootstrap/ng-bootstrap#ModalDismissReasons TypeScript Examples

The following examples show how to use @ng-bootstrap/ng-bootstrap#ModalDismissReasons. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: add.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
// STYLE PURPOSE
  private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #2
Source File: add.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #3
Source File: add.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #4
Source File: add.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #5
Source File: list.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #6
Source File: add.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
// style purpose using
  private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #7
Source File: editprofile.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #8
Source File: add.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }
Example #9
Source File: vieworders.component.ts    From spurtcommerce with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private getDismissReason(reason: any): string {
    if (reason === ModalDismissReasons.ESC) {
      return 'by pressing ESC';
    } else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
      return 'by clicking on a backdrop';
    } else {
      return `with: ${reason}`;
    }
  }