Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set NgbModalOptions when open modal in angular 2

I want display modal in Angular 2 with large content (set [size] = lg).

like image 566
Diot G Avatar asked Dec 12 '16 09:12

Diot G


1 Answers

It's very simple. Follow these steps:

  1. Import NgbModalOptions:

    import { NgbModal, NgbActiveModal, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap';
    
  2. Create NgbModalOptions object and set size property:

    let options: NgbModalOptions = {
      size: 'lg'
    };
    
  3. Open your modal dialog:

    this._modalService.open(YourModalDialogComponent,options);
    
like image 51
Anil Pinto Avatar answered Nov 12 '22 01:11

Anil Pinto