Reader small image

You're reading from  Getting Started with Angular - Second edition - Second Edition

Product typeBook
Published inFeb 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787125278
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Minko Gechev
Minko Gechev
author image
Minko Gechev

Minko Gechev is a software engineer who strongly believes in open source software. He has developed numerous such projects including codelyzer, the AngularJS style guide, aspect.js and many others, and is one of the coauthors of the official Angular style guide.
Read more about Minko Gechev

Right arrow

AoT compilation in Angular


In this section, we'll briefly explain what AoT compilation is in the context of Angular and what implication it may have on our projects, without going into deep technical details. 

The key focus in Angular is it's extremely fast change detection mechanism. After exploring different options for performing change detection, the Angular team discovered that the change detection mechanism used in AngularJS can be improved dramatically using code generation. It turns out that generating code, which performs change detection and rendering and on top of that is very well optimized for the JavaScript virtual machine, runs much faster compared to the traditional (also known as dynamic) change detection mechanism.

How code generation works

The Angular code generator is known as the Angular compiler. What it does is compile the templates of the Angular components to JavaScript or TypeScript (depending on the use case). When we compile the templates to TypeScript, we allow...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Getting Started with Angular - Second edition - Second Edition
Published in: Feb 2017Publisher: PacktISBN-13: 9781787125278

Author (1)

author image
Minko Gechev

Minko Gechev is a software engineer who strongly believes in open source software. He has developed numerous such projects including codelyzer, the AngularJS style guide, aspect.js and many others, and is one of the coauthors of the official Angular style guide.
Read more about Minko Gechev