# Ahead-of-Time Compilation

Angular [Ahead-of-Time (AOT) compilation](https://angular.dev/tools/cli/aot-compiler) compiles application templates and TypeScript during the build, before the browser loads the application. Kendo UI for Angular components support AOT without extra compiler setup.

## AOT Compilation

AOT compiles application code during the build rather than in the browser at runtime.

### How AOT Works

The Angular compiler processes component metadata and templates and produces JavaScript for the browser. It reports template and binding errors during the build. For details, see the [Angular AOT compiler guide](https://angular.dev/tools/cli/aot-compiler).

### Benefits

AOT can speed up initial rendering because the browser receives precompiled code. It can also reduce the browser payload by excluding Angular's compiler and surface template errors before deployment.

## Using AOT with the Angular CLI

Angular CLI's `ng build` and `ng serve` commands use the `aot` build option from the project configuration. New CLI applications enable AOT by default, but check `angular.json` if your project overrides this setting. Kendo UI for Angular needs no additional AOT-specific configuration.

### Building an Application

The following command builds the application with its configured AOT setting:

```sh
ng build
```

### Serving an Application Locally

The following command builds and serves the application with its configured AOT setting:

```sh
ng serve
```

## Suggested Links

* [Angular AOT Compiler Guide](https://angular.dev/tools/cli/aot-compiler)
* [Angular CLI Build Command](https://angular.dev/tools/cli/build)
