As I was way into my first full-time position as a Junior Web Developer, I realized that my co-workers were creating a separate component for each dialog required in the application. To me that was unacceptable, so I decided to develop a reusable modal component that would fit the application’s needs.

Before I start, I’d like to thank  José Fernando Costa for his article How to create a reusable Modal Dialog component in Angular 8. As I was doing some research online on how to complete my task, I came across his artice and although the frameworks used are different, I was still able to use some of his ideas in the solution I built.

We will only focus on the core functionalities of the modal, which are present in the .html and .ts files.

#tutorial #typescript #components #modal #angular

How to Create a reusable Modal component in Angular 9 using ng-bootstrap
52.30 GEEK