Angular & Signals (283 Qs)•Part 4: JIT vs AOT Compilation, Metadata & TypeScript (76 - 100)
What are the ways to control AOT compilation?
You can control your app compilation in two ways,
- By providing template compiler options in the
tsconfig.jsonfile - By configuring Angular metadata with decorators
Practical Code Example
json
// Controlling AOT in tsconfig.json / angular.json:
{
"angularCompilerOptions": {
"strictTemplates": true,
"strictInjectionParameters": true
}
}