# Installing AdapTable Angular

Canonical page: https://www.adaptabletools.com/docs/angular-installation

- AdapTable Angular is installed from a public npm Registry
- The minimum required version of Angular is 20
- Requires AG Grid Enterprise 36.2 or later

## Public npm Registry

This page describes how to install AdapTable Angular from the [public npm Registry](https://www.npmjs.com/package/@adaptabletools/adaptable-angular-aggrid).

- Read [these instructions](https://www.adaptabletools.com/docs/getting-started-installation/index.md) for installing the "vanilla" (Framework-agnostic) version of AdapTable
- See [Previous Documentation Versions](https://www.adaptabletools.com/docs/documentation-previous-versions/index.md) for instructions on installing older versions of AdapTable Angular

### Installing AdapTable Angular

To install AdapTable Angular follow these steps:

Use the `npm install` command

npm install @adaptabletools/adaptable-angular-aggrid

There is **no** need to install the AdapTable vanilla package

For example to use Master-Detail functionality add:

npm install @adaptabletools/adaptable-plugin-master-detail-aggrid

[Plugins](https://www.adaptabletools.com/docs/technical-reference-plugins/index.md) reduce download size by placing less frequently used functionality outside the main download

The currently required Angular peer dependencies are:

- `@angular/common` >= 20.0.0
- `@angular/core` >= 20.0.0

npm install @angular/common
npm install @angular/core

The Minimum Version of Angular supported by AdapTable is 20

Install the AG Grid Angular and Enterprise packages (version 36.2 or later)

npm install ag-grid-angular
npm install ag-grid-enterprise

- AG Grid 36 also installs `ag-stack` - you do not normally need to add it yourself
- If npm reports a missing peer, install `ag-stack@>=36.2.0` and keep a single copy in the project

If you plan to use AG Grid Charts, or AdapTable's [Sparkline Columns](https://www.adaptabletools.com/docs/handbook-styled-column-sparkline/index.md), additionally install the AG Charts package.

npm install ag-charts-enterprise

This is done via the `licenseKey` property in [Adaptable Options](https://www.adaptabletools.com/docs/getting-started-license-key/index.md)

```tsx
const adaptableOptions: AdaptableOptions = {
  licenseKey: '<ADAPTABLE_LICENSE_KEY_HERE>',
};
```

## CJS

AdapTable Angular is packaged using the standard [Angular package format](https://angular.dev/tools/libraries/angular-package-format).

Since [Angular v13](https://github.com/angular/angular/issues/44096#issuecomment-962436958) this is **not available in CJS format**.

This means that unlike AdapTable's Vanilla, React and Vue versions, AdapTable Angular is **only** available in ESM.

- You might need the CJS format or to use third party libraries that require the CJS format (e.g. **Jest**)
- In this use case, you will need to use some additional build tools/libraries to overcome this Angular limitation

## CommonJS Build Warnings

When building an Angular application which uses AdapTable, you may see warnings like:

```
[WARNING] Module 'react' used by 'node_modules/@adaptabletools/adaptable/...' is not ESM
CommonJS or AMD dependencies can cause optimization bailouts.
```

These warnings are emitted by all Angular builders — both the esbuild-based ones (`@angular/build:application`, `@angular-devkit/build-angular:browser-esbuild`) and the older webpack-based one (`@angular-devkit/build-angular:browser`, where the message reads `'...' depends on 'react'` instead).

These warnings refer to React ecosystem packages used internally by AdapTable (`react`, `react-dom`, and the transitive dependency `use-sync-external-store`). These packages are published as CommonJS only — no ESM distribution exists — so the warnings cannot be avoided at the package level.

The warnings are harmless: the build output is correct, and the "optimization bailout" only means the bundler cannot tree-shake inside those specific modules (which would have no effect on React's monolithic runtime anyway)

To silence the warnings, add the packages to the [allowedCommonJsDependencies](https://angular.dev/tools/cli/build#configuring-commonjs-dependencies) build option — in `angular.json`, or in `project.json` if you are using an Nx monorepo:

```json
{
  "targets": {
    "build": {
      "executor": "@angular/build:application",
      "options": {
        "allowedCommonJsDependencies": [
          "react",
          "react-dom",
          "use-sync-external-store"
        ]
      }
    }
  }
}
```

Listing a package name also covers its deep imports (e.g. `react/jsx-runtime`, `react-dom/client`, `use-sync-external-store/shim`), so these three entries are sufficient
