I do not understand the logic of creating a modal window in Angular 2. How to make the root component of a modal window, so that from any other component you can call it and transfer any component? Plugins do not need to offer.

1 answer 1

You can set up ngIf in the root component and start it at the right moments through the service ... I don’t know how correct it is)) Or even make a component that will be drawn if the condition is met!

  • I went on a similar path. Found article on Habré. Communication through the service is extremely strange, but it works - Dmitry Zaharov