Getting error on angular kendo grid

1 Answer 352 Views
Grid
Abhishek
Top achievements
Rank 1
Iron
Abhishek asked on 13 Jul 2024, 01:43 AM | edited on 13 Jul 2024, 01:46 AM

 

I am trying to set up a grid with hard coded data, but I get the following error. I am using the trial version of grid.

Any idea how to fix it ?

 

ERROR TypeError: $localize is not a function

    at consts (\node_modules\@progress\kendo-angular-grid\fesm2020\progress-kendo-angular-grid.mjs:28430:16)

    at createTView (\node_modules\@angular\core\fesm2022\core.mjs:11368:60)

    at getOrCreateComponentTView (\node_modules\@angular\core\fesm2022\core.mjs:11343:28)

    at addComponentLogic (\node_modules\@angular\core\fesm2022\core.mjs:12096:19)

    at instantiateAllDirectives (\node_modules\@angular\core\fesm2022\core.mjs:11898:9)

    at createDirectivesInstances (\node_modules\@angular\core\fesm2022\core.mjs:11306:5)

    at Module.ɵɵelementStart (\node_modules\@angular\core\fesm2022\core.mjs:23045:9)

    at StudiesComponent_Template (\src\app\components\studies\studies.component.html:4:1)

    at executeTemplate (\node_modules\@angular\core\fesm2022\core.mjs:11268:9)

    at renderView (.angular/cache/17.3.8/vite/deps/chunk-IQF64XDW.js?v=647d7f9f:7478:7) {stack: 'TypeError: $localize is not a function

    at…ite/deps/chunk-IQF64XDW.js?v=647d7f9f:7478:7)', message: '$localize is not a function'}

Georgi
Telerik team
commented on 17 Jul 2024, 09:19 AM

Hi Abhishek,

Thank you very much for the error log provided.

The issue seems related to the Angular version and the following discussion/bug in Angular:

Discussion - https://github.com/telerik/kendo-angular/issues/4195

Bug - https://github.com/angular/angular-cli/issues/26350

Could you possibly try the following - https://github.com/telerik/kendo-angular/issues/4195#issuecomment-1931777040

Or build the application and use it on a server to see if there are any issues with the translation. It is a bit messy with the above-mentioned bug, and hopefully, it will be resolved soon. Feel free to give a thumbs up on the bug for more visibility.

I hope this helps. Please, let me know if I can further assist you with this case.

Regards,
Georgi
Progress Telerik

1 Answer, 1 is accepted

Sort by
1
Abhishek
Top achievements
Rank 1
Iron
answered on 17 Jul 2024, 04:03 PM | edited on 17 Jul 2024, 04:05 PM

I was able to fix it by adding the localization library to polyfills array in angular.json.  Angular 17 doesn't have a separate polyfills.ts file like previous versions.

Thanks

Abhishek

 

Jordan
Top achievements
Rank 1
commented on 15 Mar 2025, 06:13 PM

this worked for me as well
Tags
Grid
Asked by
Abhishek
Top achievements
Rank 1
Iron
Answers by
Abhishek
Top achievements
Rank 1
Iron
Share this question
or