D
D
DTX2016-08-27 12:22:45
JavaScript
DTX, 2016-08-27 12:22:45

Angular2. How to make a modal window using a component?

Actually it is not clear whether this can be done by standard means.
Is it possible to insert a component somewhere other than the router outlet?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
_
_ _, 2016-08-27
@DirecTwiX

Is it possible to insert a component somewhere other than the router outlet?

Of course, the outlet is also a component.
By standard means - add the ModalCmp component to the document root, make the ModalService service, ask the service for a subscription to open windows from the component, list open windows in the component, add it to the list when the window opens, and display open windows through ngFor. Well, when the window is closed, you inform the service about it, and the service informs the one who opened the window.

N
napa3um, 2016-08-27
@napa3um

shlomiassaf.github.io/angular2-modal/#/bootstrap-demo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question