How it works...

In steps 1 through 4, we set up our new Angular app. In step 5, we added the ng-bootstrap package.

To generate a new component using Angular CLI, we have the following command:

ng generate component name-of-component

In step 6, we used the preceding command, naming our component "jumbotron". This command generated four additional files related to the component, and updated the src/app/app.module.ts file.

In step 7, we called the jumbotron component. In step 8, we added the code to our jumbotron component.

In step 9, we specified the styles to include. Steps 11 through 14 involve the creation of the navbar component.

In steps 15 and 16, we build and serve our Angular app.

Get Bootstrap 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.