Please support this article with your to spread it to a wider audience! Then we edit that object and pass it back to the modal-container component and log it again. Or import the first module in the secound which already included the NgbModule module. I have rerouting logic in case the session expires. To learn more, see our tips on writing great answers. If fanmixco is not suspended, they can still re-publish their posts from their dashboard. Now to make a function called openModal, lets go to theparent.component.tsfile and add the following code outside thengOnInit() function. We can see it in the log. Install ng-bootstrap by adding this command into cmd npm install --save @ng-bootstrap/ng-bootstrap Is there a solutiuon to add special characters from software and how to do it. What is the purpose of this D-shaped ring at the base of the tongue on my hiking boots? Since the dialog is going to be created on the fly, we aren't going to set up the properties on . Are you sure you want to hide this comment? The hard part was to wire the Bootstrap modal component to dynamically handle data. So far so good, but if i inject NgbActiveModal outside of the modal to close it from somewhere else it doesn't. In this article, we are going to cover a couple of bootstrap components provided by "ng-bootstrap" module in our Angular 5 apps. I have a modal component created with ng-bootstrap like follow (just a body):