Angular adapter ยท console.warn
modules/angular is deprecated: it needs the JIT compiler. Use @toclocoinc/lattice-grid/angular.
Printed by Angular adapter, prefixed [lattice], since 1.65.0.
Warnings reference › angular.deprecated
- Identifier
angular.deprecated- Raised by
- Angular adapter
- Since
- 1.65.0
What happened
createLatticeGrid from @toclocoinc/lattice-grid/modules/angular builds its component class at run time, which only works on a page that ships Angular's JIT compiler. A production (AOT) Angular build does not ship one, so this route works in development and throws in production - which is why it is deprecated rather than merely discouraged. The warning is raised as soon as the factory is called, before the compiler is even checked.
The fix
Import the ahead-of-time components from the grid package's Angular entry point instead. They are in the same install, need no compiler and work under AOT.
The smallest fix
import { LatticeGridComponent, provideLattice } from '@toclocoinc/lattice-grid/angular';
Reference
Covered in full at the API reference.