Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property 'withComponents' does not exist on type 'typeof AgGridModule'

I am using AG Grid in my Angular application and since upgrading from v27 to v28 I get the following error in my app.

Error: src/app/app.module.ts:18:18 - error TS2339: Property 'withComponents' does not exist on type 'typeof AgGridModule'.

I thought this was required when providing your own custom components to AG grid?

like image 585
Stephen Cooper Avatar asked Jan 22 '26 01:01

Stephen Cooper


1 Answers

Since v28 the AgGridModule no longer needs the .withComponents() method as all user applications will now be using Ivy. The method used to handle registering custom components as EntryComponents but that is no longer required with Ivy and was deprecated by Angular.

So to fix this error make the follow change and your custom components will still work.

- AgGridModule.withComponents([CustomComp]);
+ AgGridModule

See the AG Grid Docs on Angular Compatibility for more details.

like image 111
Stephen Cooper Avatar answered Jan 27 '26 02:01

Stephen Cooper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!