Reusable Modal
In this lesson, we'll finish the modal by allowing the user to inject content in specific sections of the modal.
We’re almost finished. We want the modal to be reusable. This means that we’ll need to be able to change the contents of the modal. Currently, it’s always showing the same content. We can change the content using the <ng-content>
placeholder.
In the modal.component.html
file, we’ll add the <ng-content>
placeholder to the <div>
element, with the modal-body
class, and the <h5>
element, with the modal-title
class. This is where the body and header of the modal are located.
Get hands-on with 1400+ tech skills courses.