Ngx-bootstrap: How to display a modal inside a div or any other container?

Created on 22 Jan 2019  路  2Comments  路  Source: valor-software/ngx-bootstrap

Hello All,

We have a requirement where we want to open a modal w.r.t some other parent container instead of simply attaching to the body container. I gone through the whole documentation and realize that there is no api support like this which offers this feature.

There should also be a way where we can open multiple modals w.r.t different containers at the same point of time. For ex: I want to open a modal separately for each widget in a dashboard based on some click action being performed in each widget.
Is there any way or work around this?

Please look at the sample below for the expected behaviour I am looking at:

https://jsfiddle.net/tng644jt/12/

Thanks,
Bhasker

comp(modal) question

Most helpful comment

@ludmilanesvitiy ,

It's not just a question I want to ask as this is also one of the feature library is expected to support this as this is the common use case in desktop scenarios especially in case of dashboards having widgets.

Library should provide a support to accept a container element w.r.t which it should open the dialog otherwise by default it should be w.r.t window element.

Thanks,
Bhasker

All 2 comments

@bhaskerchari There's no need to open an issue here if you want to ask a general question, use StackOverflow or Slack instead
https://stackoverflow.com/questions/tagged/ngx-bootstrap
https://ngx-home.slack.com/
Thanks!

@ludmilanesvitiy ,

It's not just a question I want to ask as this is also one of the feature library is expected to support this as this is the common use case in desktop scenarios especially in case of dashboards having widgets.

Library should provide a support to accept a container element w.r.t which it should open the dialog otherwise by default it should be w.r.t window element.

Thanks,
Bhasker

Was this page helpful?
0 / 5 - 0 ratings