Search⌘ K

Creating a Modal

Explore how to create and integrate a modal component in an Angular application using Bootstrap. This lesson guides you through building a contact form that triggers a modal popup, helping you learn component creation, template design, and styling techniques.

We'll cover the following...

We have one more page in the application that we’ll add some content to. The contact page should have a form where, if submitted, a modal will pop up. We can use Bootstrap to help us with styling the form and modal. You can learn about the classes required to create a modal here.

Creating the modal component

We’ll create a component to house the modal. In the command line, run the following command:

ng generate component contact/modal
...