Skip to main content
InterviewHubPRO
Section Overview
Q81

Question 81 of 283

Part 4: JIT vs AOT Compilation, Metadata & TypeScript (76 - 100)

29%
Angular Master (283 Qs)•Part 4: JIT vs AOT Compilation, Metadata & TypeScript (76 - 100)

What are the ways to control AOT compilation?

junior LevelCode ExampleTypeScript

You can control your app compilation in two ways,

  1. By providing template compiler options in the tsconfig.json file
  2. By configuring Angular metadata with decorators

Practical Code Example

json
// Controlling AOT in tsconfig.json / angular.json:
{
  "angularCompilerOptions": {
    "strictTemplates": true,
    "strictInjectionParameters": true
  }
}