Installing AdapTable Angular
Summary
- AdapTable Angular is installed from a public npm Registry
Public npm Registry
This page describes how to install AdapTable Angular 18 from the public npm Registry.
Find Out More
- Read these instructions for installing the "vanilla" (Framework-agnostic) version of AdapTable
- See Previous Documentation Versions for instructions on installing older versions of AdapTable Angular
Developer Guide
Installing AdapTable Angular
To install AdapTable Angular follow these steps:
Use the npm install commmand
Note
There is no need to install the AdapTable vanilla package
For example to use Master-Detail functionality add:
Hint
Plugins reduce download size by placing less frequently used functionality outside the main download
The currently required Angular peer dependencies are:
@angular/common>= 18.0.0@angular/core>= 18.0.0
Note
The Minimum Version of Angular supported by AdapTable is 18
Install the AG Grid Angular and Enterprise packages (version 35.2 or later)
If you plan to use AG Grid Charts, or AdapTable's Sparkline Columns, additionally install the AG Charts package.
const adaptableOptions: AdaptableOptions = {
licenseKey: '<ADAPTABLE_LICENSE_KEY_HERE>',
};This is done via the licenseKey property in Adaptable Options
CJS
AdapTable Angular is packaged using the standard Angular package format.
Since Angular v13 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.
Hint
- 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.
Note
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 build option — in angular.json, or in project.json if you are using an Nx monorepo:
{
"targets": {
"build": {
"executor": "@angular/build:application",
"options": {
"allowedCommonJsDependencies": [
"react",
"react-dom",
"use-sync-external-store"
]
}
}
}
}Hint
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