I am opening an NgbModal passing a TemplateRef to create the dialog body, and passing in a custom class via the windowClass property of the NgbModalOptions object that I pass to the open() method. I define the class in a referenced styleUrl in the component and am serving the modal via an injectable service in the component. The modal is loading fine, and I can see the class name when I inspect the DOM, but the class appears to have no bearing on the modal. I would like to use it to customize the size of the modal (css is defined to affect the child div where the size is set), but I have also played with properties that I can see in the Styles tab of the Chrome dev tools, but cannot see it affecting anything. When I inspect in Firefox dev tools, I can find the CSS as an inline style sheet and it has a reference to the ngContent identifier assigned by Angular, so I am assuming that is does not affect the entire document, nor those parts added by ng-bootstrap that constitute the modal wrapper. Has anyone been able to make this work successfully? I am at my wit's end. I would even be happy if I could get an ElementRef of the modal-header dive, but since I am using a template (which is not fully loaded in the DOM at init time) I have not been able to. One of my requirements is that we do all DOM manipulation via Angular to maintain platform independence in the project ... so no jQuery. Any thoughts? And thanks in advance!!
Does the windowClass property or NgbModalOptions actually do anything?
2.5k views Asked by burghboy At
1
There are 1 answers
Related Questions in ANGULAR5
- Ionic 3 issue while generating AAB file
- How to make Cancellable api calls in loop in Angular?
- Add two different index.html in angular.cli.json
- Error: Emit attempted before Angular Webpack plugin initialization(Error: Emit attempted before Angular Webpack plugin initialization)
- Error when executing npm install @types\selenium-webdriver-93afec84\package.json
- TypeError: Cannot read properties of undefined (reading 'mangleWasmImports')
- Compilation errors showing up only locally (Angular)
- Angular 5 karma code coverage report generation using webpack
- In Angular 5 project getting gyp errors on npm install
- [email protected] added to Ionic3+Angular5 app: "Module Parse Failed" due to spread operator "..."
- How to add proxy configuration in web.config file and remove from appsettings.json in .NET 6 with Angular 5?
- Sections don't take the full width of the window in Angular
- I have to filter out nested object based on condition in angular 14
- Configure Jest to Angular 5
- Get Angular Type<> from component instance in Angular 5
Related Questions in NG-BOOTSTRAP
- Tooltip buttons not working as expected/ Tooltip Closing when button is clicked
- NgbModal from ng-bootstrap freezing and not working in ng-bootstrap version 15 and Angular version 16
- Angular 17 - RangeError: Maximum call stack size exceeded on getComputedStyle
- Customizing ngb-typeahead button (dropdown-item) in anglular
- Angular 17 and ng-bootstrap,ngb-pagination problem
- How to implement responsive offcanvas with ng-bootstrap
- How can I write a custom type declaration for NgbModal that correctly infers the type of modalInstance?
- ngbTooltip - Cancel tooltip appearance during delay
- TypeError: Cannot read properties of null (reading '$implicit') with async pipe
- ngb datepicker hover issue
- Angular 17.0.6 issue with ng-bootstrap 16 heeeeeelp
- cannot access accordion properties in component .ts file in angular using ng-bootstrap angular 17
- How to Reshow ngbAlert (Bootstrap widgest for Angular) message again after dismissing it
- Angular 17.0.9 issue with ng-bootstrap 16
- ng-bootstrap scrollspy doesn't work without height?
Related Questions in ANGULAR6
- Angular Drag Drop Resize With virtual Scroller
- How to resolve reg expression in angular 6
- Angular 15: Image not loading from asset folder post deployment
- Sporadic: REST service gets triggered multiple times even if in DevTools the network call is triggered only once
- Replacing the base-href in Index page Angular
- How to validate mat input text field inside a mat table in angular 6?
- Angular 6 : Checking for safe route/URL
- anchor tag keyup.enter event not opening up bootstrap based modal
- keyup.enter/space event triggers multiple times on "@fortawesome/angular-fontawesome" icon / Angular 6 project
- Failed to run any NPM Command Error: `gyp` failed with exit code: 1
- Already I have keyup function in Angular 6 Project, Now I want to apply this function into debounce time. So how can I do that?
- How to remove script tags in index.html from Angular Component
- Properties do not exist on type 'MsalService'
- @google-pay/button-angular issue: Cannot read properties of undefined (reading 'pay'),
- how to test the following code in jasmine - angular6
Related Questions in NG-MODAL
- Angular - set dropdown object value upon deleting a dropdown object is not working
- Refresh a Select Dropdown After Saving Modal Form
- How to not update the data after cancel or close the modal in Angular?
- Angular 11 - mat-sort is not working in ng-modal table
- Angular NgbModal, how to correctly close a modal window?
- How Scroll to a div in ng-template?
- Angular NgModal opens but can't click in any input or button
- Group by Question and ng-model differentiation with AngularJS
- Angular7 and NgbModal: how to remove default auto focus
- How can I check that a form has unsaved changes before closing ng-modal in Angular 5?
- Does the windowClass property or NgbModalOptions actually do anything?
- ng-options with multiple select/Checkbox
- How to vertically center modal dialog using ng-modal
- Angular2 bootstrap modal with child component
- ng-bootstrap modal opens component, but places html-selector
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I use windowClass and size attributes of NgbModalOptions to customize the modal. Sample code follows:
Whereas