Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Angular Projects
  • Table Of Contents Toc
Angular Projects

Angular Projects - Fourth Edition

By : Aristeidis Bampakos
close
close
Angular Projects

Angular Projects

By: Aristeidis Bampakos

Overview of this book

Angular has evolved toward faster delivery, server rendering, and an enhanced developer experience. This book shows what that looks like in practice. Each project reflects how real teams work: forms, routing, data, and the small choices that make an app feel finished. You will build with just enough tech to matter: signals, template-driven and reactive forms; PrimeNG, Angular Material, and Telerik UI; Google Maps; drag-and-drop; and desktop features. You will also wire up backend NestJS with MongoDB, Firebase services, and email notifications, then improve delivery with SSR and SSG and focused Core Web Vitals improvements. Guided by Aristeidis Bampakos, a Google Developer Expert for Angular and an experienced team lead, you will learn practical patterns you can apply right from the get-go. By the end, you will not just “know” Angular. You will think like a front-end engineer who can deliver, portfolio in hand, job-ready and confident to level up in your current role.
Table of Contents (14 chapters)
close
close
12
Other Books You May Enjoy
13
Index

Creating an Angular application

Every chapter of the book requires setting up a new Angular application. The standard tool for making an Angular application is the Angular CLI. It is an npm package that provides a command-line tool to scaffold and run an Angular application. In the following section, we will learn how to install it.

Installing the Angular CLI

Open a terminal window and run the following command to install the Angular CLI globally on your machine:

npm install -g @angular/cli

The preceding command will install the latest version of the Angular CLI, which is published on the npm registry by the Angular team.

In this book, we use the npm package manager due to its widespread adoption in the web development community. If you are using a different package manager, visit https://angular.dev/tools/cli/setup-local#install-the-angular-cli to learn more about how to install it.

To verify that you have installed version 22, run the following command in the same terminal window:

ng version

The output of the preceding command should indicate that the installed Angular CLI is version 22.

The examples demonstrated in this book have been developed and tested with version 22 of the Angular CLI.

If you have a different version installed, run the following command to install the correct one:

npm install -g @angular/cli@22

Your local environment is now configured with the Angular CLI, and you are ready to start building Angular applications. In the following section, you will use the Angular CLI to create a new application.

Scaffolding a new application

We use the Angular CLI by running the ng executable from a terminal window. It accepts an option as a parameter that defines the type of task we want to complete using the Angular CLI.

You can view a complete list of the supported options at https://angular.dev/cli.

The new option indicates that we want to scaffold a new Angular application:

  1. Run the following command in a terminal window:
    ng new my-app

    The preceding command will initiate a process that guides you in creating a new Angular application named my‑app. The process involves asking questions to provide more context in the CLI about the application you want to build.

  2. The first question is about what stylesheet format we would like to use in our application. The Angular CLI supports the following formats:
    • CSS
    • Tailwind CSS
    • Sass
    • Less

    Use the keyboard arrows to highlight the Sass (SCSS) option and press Enter.

  3. The next question is whether we want to configure the application for server-side rendering (SSR). Press Enter to skip this step. We will build an SSR-enabled application in Chapter 7, Expense Builder: Building an SSR-Optimized Expense Tracker.
  4. The last question prompts us to add an AI coding assistant to the Angular project. The Angular CLI supports a rich collection of AI tools. Select the GitHub Copilot option and press Enter.

The Angular CLI downloads and installs all necessary packages and creates default files for your Angular application. After finishing, the my‑app folder will contain a basic Angular application.

Execute the following command from a terminal window inside the my‑app folder to run your application:

ng serve 

The Angular CLI compiles the Angular application and starts a web server to host it. After successful compilation, you can preview the application by opening your browser and navigating to http://localhost:4200.

We now have a basic Angular application that will serve as the foundation for the projects we will build in the following chapters. In the next section, we will learn about the tools required to develop our Angular projects.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Angular Projects
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon