E-Book, Englisch, 486 Seiten
Bampakos Learning Angular
1. Auflage 2025
ISBN: 978-1-83508-155-6
Verlag: Packt Publishing
Format: EPUB
Kopierschutz: 0 - No protection
A practical guide to building web applications with modern Angular
E-Book, Englisch, 486 Seiten
ISBN: 978-1-83508-155-6
Verlag: Packt Publishing
Format: EPUB
Kopierschutz: 0 - No protection
Dive into Angular Development - With the Most Trusted Guide in the Industry
Angular is one of the most powerful and widely adopted JavaScript frameworks and Learning Angular is your go-to guide for building real-world, production-ready web applications from the ground up. Written by a seasoned Angular developer and Google Developer Expert, this hands-on guide walks you through every step of modern frontend development.
This edition captures the latest evolution in the Angular ecosystem, often referred to as the 'Angular Renaissance.' You'll work with standalone components, Angular Signals, and the updated control flow syntax, while also learning how to bridge these advancements with legacy code. A brand-new chapter explores how to boost performance with server-side rendering (SSR) and hydration.
More than just a tutorial, Learning Angular builds your confidence chapter by chapter, from scaffolding your first project to deploying it and applying TypeScript best practices along the way.
Whether you're new to Angular or brushing up your skills, this book offers a complete path to becoming a productive and future-ready Angular developer.
By the end, you'll not only be able to build Angular apps from scratch, you'll be equipped to build them with clarity, structure, and confidence.
Autoren/Hrsg.
Weitere Infos & Material
Preface
As Angular continues to reign as one of the top JavaScript frameworks, more developers are seeking out the best way to get started with this extraordinarily flexible and secure framework. , now in its fifth edition, will show you how you can use Angular to achieve cross-platform high performance with the latest web techniques, extensive integration with modern web standards, and integrated development environments (IDEs).
This book is especially useful for those new to Angular and will help you to get to grips with the bare bones of the framework needed to start developing Angular apps. You’ll learn how to develop apps by harnessing the power of the Angular command-line interface (CLI), write unit tests, style your apps by following the Material Design guidelines, and finally, build them for production.
Updated for Angular 19, this new edition covers lots of new features and practices that address the current frontend web development challenges. You’ll find new dedicated chapters on signals and optimization, as well as more on error handling and debugging in Angular, and new real-life examples. By the end of this book, you’ll not only be able to create Angular applications with TypeScript from scratch, but also enhance your coding skills with best practices.
Who this book is for
This book is for web developers that want to get started with frontend development, and frontend developers that want to expand their knowledge of JavaScript frameworks. You’ll need prior exposure to JavaScript, basic knowledge of the command line, and to be comfortable with using IDEs to get started with this book.
What this book covers
,
In this chapter, we set up the development environment by installing the Angular CLI and learn how to use schematics (commands) to automate tasks such as code generation and application building. We create a new simple application using the Angular CLI and build it. We also learn about some of the most useful Angular tools that are available in Visual Studio Code.
,
In this chapter, we learn what TypeScript is, the language that is used when creating Angular applications, and what the most basic building blocks are, such as types and classes. We take a look at some of the advanced types available and the latest features of the language.
,
In this chapter, we learn how a component is connected to its template and use a decorator to configure it. We take a look at how components communicate with each other by passing data from one component to another using input and output bindings and learn about the different strategies to detect changes in a component. We also learn how to execute custom logic during the component lifecycle.
,
In this chapter, we take a look at Angular’s built-in pipes and we build our own custom pipe. We learn how to create directives and leverage them through an Angular application that demonstrates their use.
,
In this chapter, we learn how the dependency injection mechanism works, create and use services in components into components, and how to create providers in an Angular application.
,
In this chapter, we learn what reactive programming is and how we can use observables in the context of an Angular application through the RxJS library. We also take a tour of all the common RxJS operators that are used in an Angular application.
,
In this chapter, we learn the basic concepts of the Signals API and the rationale behind its use. We explore how to use signals for tracking the state of an Angular application. We also take a look at signals interoperability with RxJS and how they can play nicely together in a sample application.
,
In this chapter, we learn how to interact with a remote backend API and perform CRUD operations with data in Angular. We also investigate how to set additional headers to an HTTP request and intercept it before sending the request or upon completion.
,
In this chapter, we learn how to use the Angular router in order to activate different parts of an Angular application. We find out how to pass parameters through the URL and how to break an application into child routes that can be lazy loaded. We then learn how to guard against our components and how to prepare data prior to initialization of the component.
,
In this chapter, we learn how to use Angular forms in order to integrate HTML forms into an application and how to set them up using FormGroup and FormControl. We track the interaction of the user in the form and validate input fields.
,
In this chapter, we learn how to handle different types of errors in an Angular application and learn about errors that come from the framework itself.
,
In this chapter, we learn how to integrate Google Material Design guidelines in to an Angular application using a library called Angular Material, developed by the Angular team. We take a look at some of the core components of the library and how to use them. We discuss the themes that are bundled with the library and how to install them.
,
In this chapter, we learn how to test Angular artifacts and override them in a test, what the different parts of a test are, and which parts of a component should be tested.
,
In this chapter, we learn how to use the Angular CLI to build and deploy an Angular application. We take a look at how to pass environment variables during the build and how to perform build optimizations prior to deployment.
,
In this chapter, we learn what Core Web Vitals (CWV) are and how they affect the performance of an Angular application. We explore three different ways to improve CWV metrics: how to render an application server-side, how to benefit from hydration, and how to optimize our images.
To get the most out of this book
You will need a version of Angular 19 installed on your computer, preferably the latest one. All code examples have been tested using Angular 19.0.0 on Windows, but they should work with any future release of Angular 19 as well.
We advise you to type the code for this book yourself or access the code via the GitHub repository (the link is in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
Download the example code files
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at http://www.packtpub.com.
- Select the SUPPORT tab.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box and follow the on-screen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learning-Angular-Fifth-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781835087480.
Conventions used
There are a number of text conventions used throughout this book.
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and social media handles. For example; “Mount the downloaded disk image file as another disk in your system.”
A block of code is set as follows: