question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FR] Set NgbModalOptions Globally

See original GitHub issue

Feature request description:

It would be nice to have an ability to set NgbModalOptions globally, as it is currently implemented for NgbTooltipConfig, for example: https://stackoverflow.com/a/44660183/1611569.

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 6.0.0

ng-bootstrap: 2.1.2

Bootstrap: 4.1.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Yura13commented, Aug 28, 2018

Properties of NgbModalConfig should have the same types as in NgbModalOptions.

NgbModalOptions has property: backdrop?: boolean | ‘static’; NgbModalConfig has property: backdrop: boolean;

1reaction
Halfistcommented, Aug 31, 2018

@pkozlowski-opensource, could you please explain me how to use NgbModalConfig? I can’t find the example on https://ng-bootstrap.github.io/#/components/modal/api#NgbModalConfig. I tried to follow typeaheads global configuration example,

// app.component.ts
constructor(ngbModalConfig: NgbModalConfig) {
    ngbModalConfig.backdrop = 'static';
}

but got an error TS2322: Type ‘“static”’ is not assignable to type ‘boolean’.

And one more question. Since I updated to 3.1.0, my IDE warns me that NgbModule.forRoot() is deprecated. However, on this demo I see exactly the same. The question is, should I just remove .forRoot()?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modal - Angular powered Bootstrap
Bootstrap widgets for Angular: autocomplete, accordion, alert, carousel, datepicker, dropdown, offcanvas, pagination, popover, progressbar, rating, tabset, ...
Read more >
How to set NgbModalOptions when open modal in angular 2
It's very simple. Follow these steps: Import NgbModalOptions: import { NgbModal, NgbActiveModal, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap';.
Read more >
Custom NgbModal service to set default config on open does ...
I want all the modals in our application to have a set of default options, ... way to have a global config on...
Read more >
UI/Angular/Modal | Documentation Center | ABP.IO
ModalComponent is a pre-built component exposed by @abp/ng.theme.shared package to show modals. The component uses the ng-bootstrap's modal ...
Read more >
how to set the z-index of two modal overlays in a stack wise in ...
Coding example for the question how to set the z-index of two modal overlays in a stack wise in Angular?-angular.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found