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 Accelerating Angular Development with Ivy
  • Table Of Contents Toc
  • Feedback & Rating feedback
Accelerating Angular Development with Ivy

Accelerating Angular Development with Ivy

By : Nielsen, Carniatto, Andresen
4.5 (10)
close
close
Accelerating Angular Development with Ivy

Accelerating Angular Development with Ivy

4.5 (10)
By: Nielsen, Carniatto, Andresen

Overview of this book

Angular Ivy is the latest rendering engine and compiler introduced in Angular. Ivy helps frontend developers to make their Angular applications faster, better optimized, and more robust. This easy-to-follow guide will help you get to grips with the new features of Angular Ivy and show you how to migrate your Angular apps from View Engine to Ivy. You'll begin by learning about the most popular features of Angular Ivy with the help of simple stand-alone examples and realize its capabilities by working on a real-world application project. You'll then discover strategies to improve your developer workflow through new debugging APIs, testing APIs, and configurations that support higher code quality and productive development features. Throughout the book, you'll explore essential components of Angular, such as Angular Component Dev Kit (CDK), Ahead-of-time (AOT) compilation, and Angular command line interface (CLI). Finally, you'll gain a clear understanding of these components along with Angular Ivy which will help you update your Angular applications with modern features. By the end of this Angular Ivy book, you will learn about the core features of Angular Ivy, discover how to migrate your Angular View Engine application, and find out how to set up a high-quality Angular Ivy project.
Table of Contents (14 chapters)
close
close

Chapter 2: Boosting Developer Productivity Through Tooling, Configuration, and Convenience

Across data binding and attribute directives, there are many options to dynamically change styles in an Angular application. Angular Ivy supports multiple styling application programming interfaces (APIs) in a predictable way. This chapter teaches us about Angular Ivy's style binding precedence rules through a simple example that uses almost every possible style API in Angular.

Through a few examples, we will explore how directive and component inheritance and the sharing of metadata have changed in Angular Ivy. Before that, we learn which metadata properties are sharable through inheritance.

Ahead-of-time (AOT) compilation was introduced in one of the first major releases of Angular. Angular Ivy is the first generation to enable it in all phases of the application life cycle—from development through testing to builds. We will discuss how this affects our workflow and bundle size after briefly peeking under the hood of Angular to discuss some of the internal building blocks that have enabled the performance improvements needed to make this change.

The strict mode preset available with Angular Ivy enables additional compile-time checks of our Angular applications as well as bundle optimizations.

Angular Ivy and its supported versions of TypeScript have added significant speed improvements and stricter checks to tests. We will learn about this through examples that are easy to understand.

Angular's compiler analyzes our application code at build time. This is nice, but some of the compiler error messages suffer from missing context. In Angular Ivy, contextual details have been added to several compilation error messages. In this chapter, you will see Ivy compilation error examples compared to compilation errors from earlier generations of Angular as we discuss how it improves the developer experience.

Angular is known for great tooling and support for strong typing through TypeScript. However, we have not been able to type-check all parts of our component templates in the first or second generation of the Angular framework. The Ivy generation completes the component template type-checking story for the Angular framework.

Automated migration schematics are a wonderful piece of tooling that is part of the Angular framework. Since Ivy was released, they include messages with descriptions and an option to run them in separate commits, as we will see in this chapter.

The versions of the Angular Language Service introduced with Angular Ivy have allowed for better integration with integrated development environments (IDEs) such as Visual Studio Code (VS Code). Additional tooltips are added to component templates and additional details have been added to existing tooltips. Syntax highlighting has been added to inline templates and improved for external file templates.

In this second chapter, we are going to cover these topics:

  • Using predictable style bindings
  • Sharing metadata through directive and component inheritance
  • Outputting faster and smaller bundles with AOT compilation
  • Taking advantage of strict mode and other new configurations
  • Enhancing our Angular testing experience
  • Leveling up our developer experience

After finishing this chapter, you can boost your developer productivity by taking advantage of the latest improvements in tooling, configuration, and other Angular features.

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