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 Learning Angular
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Angular

Learning Angular

By : Aristeidis Bampakos
4 (6)
close
close
Learning Angular

Learning Angular

4 (6)
By: Aristeidis Bampakos

Overview of this book

Angular is an extremely fast, cross-platform JavaScript framework loved by millions. Learning Angular is a comprehensive introduction to the framework from an experienced Angular developer and Google Developer Expert. You’ll learn the Angular way of development as you build a real-world app from the ground up. Updated for Angular 19, this fifth edition tackles landmark changes in Angular after the “Angular Renaissance”. It covers app creation with standalone components, Angular Signals, and the new control flow syntax, while acknowledging differences in approach in older Angular code. You’ll also find a brand-new chapter on optimizing performance with SSR and hydration, as well as revamped content on TypeScript. Angular developers of all experience levels will benefit from this book. It is especially useful if you are new to Angular, as it will help you get to grips with the bare bones of the framework. By the end of this book, you'll be able to create Angular applications with TypeScript from scratch and apply best practices in any Angular codebase.
Table of Contents (15 chapters)
close
close
Free Chapter
1
Learning Angular, Fifth Edition: A practical guide to building web applications with modern Angular

Introducing the component lifecycle

Lifecycle events are hooks that allow us to jump into specific stages in the lifecycle of a component and apply custom logic. They are optional to use but might be valuable if you understand how to use them.

Some hooks are considered best practices, while others help debug and understand what happens in an Angular application. A hook has an interface defining a method we need to implement. The Angular framework ensures the hook is called, provided we have implemented this method in the component.

Defining the interface in the component is not obligatory but is considered a good practice. Angular cares only about whether we have implemented the actual method or not.

The most basic lifecycle hooks of an Angular component are:

  • ngOnInit: This is called when a component is initialized
  • ngOnDestroy: This is called when a component is destroyed
  • ngOnChanges: This is called when values of input binding properties in the component change
  • ngAfterViewInit: This...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

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