English
latest (v4.7.0)

Dialog CORE

Description and examples API Setup Source code
  1. Use open method to initiate a dialog, subscribe to a returned Observable to show it :

  2. If you want to use your own component as a dialog content, use POLYMORPHEUS_CONTEXT in it. Dialog will provide this token with some useful options: $implicit with Observer<O> and completeWith hook to call next and complete in one action.

  3. You can also use a template
  4. Use Observer from $implicit field of context to close a dialog or get some data

  5. If you use dialog components in lazy loading modules, and want to reach for some local providers, you can pass Injector into new PolymorpheusComponent of your dialog component.