Creating a New Project

In this lesson, we'll create a new project for learning modules.

It’s time to learn about modules. Modules are a way to group a set of components that share a common purpose. They’re a great way to organize an application by feature. We’ll dive more into it throughout this section. First things first, let’s create a new project.

New project with routing

We’re going to be focusing on multiple topics for this project. It’s going to be larger than what we’ve done so far. We’re going to include routing.

If you’re running code locally, then you’ll need to run the following command:

ng new website --routing

During the setup process, the CLI will ask you about the default settings for the project. Typically, it will ask if you’d like to add routing. By adding the --routing option, it will skip this question and automatically install routing for you. As for the rest of the settings, you can go with the default.

Alternatively, you can just run the command without the --routing option. You can select to have routing installed during the setup. They both result in the same thing.

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"

We’re done! Here’s the codebase we’ll be using for this project:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy