Creating a New Project
In this lesson, we'll get started with the next project that we'll be tackling in the next couple of sections.
We'll cover the following
The next project we’ll be working on will be an application in which visitors can search for cocktails. This will require an extensive database of alcoholic beverages. Fortunately, there are APIs that we can use to query for a list of cocktails. For this project, we’ll be using a service called the Cocktail DB. It’s completely free.
You can find more information about its API here.
We’re going to be focusing on multiple topics for this project. The main objectives of this project are to learn about the following:
- Services
- Performing HTTP requests
- Security
- RxJS
New project
If you’re running code locally, then you’ll need to run the following command:
ng new cocktails
During the setup process, the CLI will ask you to configure the project. The default settings work fine. We won’t need routing for this project.
Installing Bootstrap
After installing the project, navigate to the newly created directory and install Bootstrap. We’ll be using it to help us with styles. You can run the following command to install Bootstrap:
npm i bootstrap
We’ll need to update the styles.css
file to import Bootstrap.
@import "bootstrap/dist/css/bootstrap.css"
Project architecture
The overall structure of the project will be simple. We’ll have a form to perform a search and a table to display the list of results. It would be a good idea to put these two sections into their own components to keep things organized. Here’s what the project architecture will look like:
Get hands-on with 1400+ tech skills courses.