Reputation: 5982
I followed this post to create a custom modal. Everything works as supposed except putting other Angular components inside the <div class="modal-body">
.
The template and CSS of the inserted components loads but the javascript just doesn't work.
How is it possible to insert working Angular components into such a dialog?
Upvotes: 0
Views: 999
Reputation: 406
for all the dynamically called components( those components which we are not mentioned in the template by the template selector) should be added to the entry components. If we do that Angular will instantiate the component for us.
The best practice is to mention the components in the component declarations and if there is any dynamically created components, add them into entry components. Everytime we add components to entry components it cost us the performance. try to reduced the entry components :). Hope I answered your query.
Upvotes: 1