ABP ModalComponent is using ng-boostrap under the hood which is good. However, I don't see anywhere mentioned "NgbModal.open" function in ABP Modal documentation. (https://abp.io/docs/latest/framework/ui/angular/modal)
Is there a different way to approach this in ABP? The goal is we want to have a new instance inside of modal window when display every time.
Reference from ng-boostrap: https://ng-bootstrap.github.io/#/components/modal/api#NgbModal open open(content: any, options: NgbModalOptions) => NgbModalRef Opens a new modal window with the specified content and supplied options. Content can be provided as a TemplateRef or a component type. If you pass a component type as content, then instances of those components can be injected with an instance of the NgbActiveModal class. You can then use NgbActiveModal methods to close / dismiss modals from "inside" of your component. Also see the NgbModalOptions for the list of supported options.
4 Answer(s)
-
0
Hello, as you may derive from the codebase (https://github.com/abpframework/abp/tree/dev/npm/ng-packs/packages/theme-shared/src/lib/components/modal), ABP modal component supports all the options in the same way with the
NgbModalOptions
Since then the open function in the library will handle the options by appending them to the modal refence, you can implement the intended behavior.
If you think that your case is not dependent on this, I can assist you further.
-
0
Thanks for the advice. Is that possible ABP can include this type of feature by default?
I believe this can benefit all users. Also, angular material UI uses the same practice. (https://material.angular.io/components/dialog/api)
-
0
If your aim is to utilize the Material Dialog component, as far as I have understood, we do not have such a plan in the short term. However, we can discuss this for our long term plans.
-
0
Hello Sumeyye, we don't have plan on using Angular Material components. We want to use out-of-box components from ABP framework, and this component injection for Modal windows is important for building the front-end application. I would like your team to consider on adding this feature into your roadmap. Thanks.