# Kendo UI for Angular Troubleshooting

This article lists solutions to common issues you may encounter when using Kendo UI for Angular components.

## Kendo UI for Angular components don't behave as expected in Angular v21

Some Kendo UI for Angular components don't behave as expected and user actions trigger JavaScript errors in certain scenarios. The UI doesn't update when the underlying data model changes, component properties don't reflect updated values, or interactions produce unexpected errors in the console.

**Cause**

Angular no longer provides a change detection scheduler for ZoneJS-based change detection by default in recent versions.

Kendo UI for Angular components rely on `ZoneJS` to trigger change detection and do not currently provide [support for Zoneless change detection](https://www.telerik.com/kendo-angular-ui/components/faq#do-kendo-angular-components-work-with-zoneless-change-detection). Without the `provideZoneChangeDetection` provider, Angular cannot detect when changes occur, causing Kendo components to appear unresponsive or behave unexpectedly.

**Solution**

Add [`provideZoneChangeDetection`](https://angular.dev/api/core/provideZoneChangeDetection) from `@angular/core` to the providers array in your `app.config.ts` file:

```ts
import { provideZoneChangeDetection } from '@angular/core';

export const appConfig: ApplicationConfig = {
  providers: [
    provideZoneChangeDetection({ eventCoalescing: true }),
    // ... other providers
  ]
};
```

## NG05105: Unexpected synthetic property @state found error

You may see this error when using Kendo UI components that include animations, such as TabStrip or DropDowns:

```text
NG05105: Unexpected synthetic property @state found
```

**Cause**

Angular's animation system is not enabled in the application. Kendo UI components that use animations require Angular's animation infrastructure even in standalone applications.

**Solution**

Add `provideAnimations()` from `@angular/platform-browser/animations` to the providers array in your **app.config.ts** file:

> caution Although Angular has deprecated `provideAnimations()`, Kendo components still depend on it. The removal is planned for [v23 of Angular](https://angular.dev/api/platform-browser/animations/provideAnimations), so developers must continue to import it until then.

```ts
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideAnimations } from '@angular/platform-browser/animations';

import { routes } from './app.routes';

export const appConfig: ApplicationConfig = {
  providers: [
    provideZoneChangeDetection({ eventCoalescing: true }),
    provideRouter(routes),
    provideAnimations()
  ]
};
```

## Missing Angular localize package for `i18n` support

Installing a Kendo UI for Angular package may trigger the following error:

```text
Angular 9 introduced a global `$localize()` function that needs to be loaded.
Please run `ng add @angular/localize` from the Angular CLI.
```

**Cause**

Most Kendo UI for Angular components depend on Angular's localization infrastructure for translation and custom messaging. That is why the Angular localize package must be installed, even if your application does not require localization.

**Solution**

For Angular versions 9 through 15, the package is not included by default and must be added to the project manually. To do so, run the following command:

```bash
ng add @angular/localize
```

Starting with Angular 16, the Angular CLI began automatically adding `@angular/localize` as a dependency for newly generated projects. This means that for projects created with Angular 16 or later, the package is present by default, and the global `$localize()` function is loaded automatically. However, for existing applications upgraded to Angular 16, the package must still be added manually if required.

## Libraries are not translated in Angular 17 app with build-angular:application

**Cause**

Components, coming from external libraries are not translated in Angular 17 applications that are build with the new [`application` builder](https://angular.dev/tools/cli/build-system-migration) and run using `ng serve`.

**Solution**

To avoid this problem you can do any of the following:

* configure the application to use the "browser" builder in `angular.json`:

  ```ts
  "architect": {
    "build": {
      "builder": "@angular-devkit/build-angular:browser",
    }
  }
  ...
  ```

* build the application for the respective locale using `ng build` (such as `ng build --configuration="es"`), and serve the application using another server, for example [`http-server`](https://www.npmjs.com/package/http-server).

Further details are available in the following GitHub issues:

* <https://github.com/telerik/kendo-angular/issues/4195>
* <https://github.com/angular/angular-cli/issues/27051>
* <https://github.com/angular/angular-cli/issues/26350>

## When I try to load a Kendo UI for Angular component in a standalone component, an error occurs

The error message might be similar to `Angular detected that the 'AnimationBuilder' was injected, but animation support was not enabled`.

**Cause**

Kendo UI for Angular components that depend on the [Popup](https://www.telerik.com/kendo-angular-ui/components/popup) component, requires importing the Angular [`BrowserAnimationsModule`](https://angular.dev/api/platform-browser/animations/BrowserAnimationsModule). The error occurs in standalone components due to a missing `BrowserAnimationsModule` import.

**Solution**

In the **app.config.ts** file, import the `BrowserAnimationsModule` using [`importProvidersFrom`](https://angular.jp/api/core/importProvidersFrom) function.

```ts
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

export const appConfig: ApplicationConfig = {
    providers: [provideRouter(routes), importProvidersFrom([BrowserAnimationsModule])]
};
```

## I cannot install the latest versions of Kendo UI packages for Angular

**Cause**

Due to recurring issues with the initial privately-scoped Progress registry, all Kendo UI packages for Angular are now published on the public <https://www.npmjs.com/~progress> registry. For more information, refer to [issue/712](https://github.com/telerik/kendo-angular/issues/712).

**Solution**

1. In your `.npmrc` file, remove the following lines:

   ```sh
   @progress:registry=https://registry.npm.telerik.com/
   //registry.npm.telerik.com/:_authToken=<token>
   ```

2. If present, remove `package-lock.json` to clear the stored package locations.

## When I try to load a Kendo UI component for Angular, a runtime error occurs that the component is not recognized

The error message might be similar to `Can't bind to '[property-name]' since it isn't a known property of 'kendo-[component-name]'`.

**Cause**

The Kendo UI component module is either:

* Not imported in the module where declared and intended to be used, or
* Not re-exported from a `SharedModule` which declares the component in which the Kendo UI component for Angular is used.

**Solution**

Depending on the scenario of your project, either:

1. Import the Kendo UI component module in the same module where declared and intended to be used, or
2. Re-export the Kendo UI component module from `[YourCustom]Module`, which imports the Kendo UI module for Angular.

For more information on a real use case issue, refer to [this Telerik forum thread](https://www.telerik.com/forums/can%27t-bind-to-%27data%27-since-it-isn%27t-a-known-property-of-%27kendo-dropdownlist%27).

For more information on how to handle Angular modules, refer to the:

* [Official Angular documentation on ngModule](https://angular.dev/api/core/NgModule#).
* [Angular FAQs](https://angular.dev/overview#what-kinds-of-modules-should-i-have-and-how-should-i-use-them).

For more information on how to implement Angular Forms by using Kendo UI form components, refer to the:

* [Official Angular documentation on Forms](https://angular.dev/guide/forms).
* Articles on forms support for each Kendo UI form component. For example, the article on the [forms supported by the NumericTextBox](https://www.telerik.com/kendo-angular-ui/components/inputs/numerictextbox/forms).

## When I try to use Kendo UI for Angular in my .NET project, Webpack-related errors occur

The error message might be similar to:

```sh
ERROR in ./$$_gendir/~/@progress/kendo-angular-popup/dist/es/popup.component.ngfactory.ts
    Module parse failed: C:\[user-specific path]\$$_gendir\node_modules\@progress\kendo-angular-popup\dist\es\popup.component.ngfactory.ts Unexpected token (17:27)
    You may need an appropriate loader to handle this file type.
    | import * as i6 from '@progress/kendo-angular-popup/dist/es/services/resize.service';
    | import * as i7 from '@progress/kendo-angular-popup/dist/es/services/scrollable.service';
    | const styles_PopupComponent:any[] = ([] as any[]);
    | export const RenderType_PopupComponent:i0.RendererType2 = i0.╔Ácrt({encapsulation:2,
    |     styles:styles_PopupComponent,data:{'animation':[{type:7,name:'toggle',definitions:[{type:1,
     @ ./$$_gendir/ClientApp/app/app.module.browser.ngfactory.ts 10:0-118
     @ ./ClientApp/boot.browser.ts
```

**Cause**

The JavaScriptServices team erroneously assume that the Angular components in the .NET Core template are present in the **ClientApp** folder only. As a result, the publishing process fails when Webpack encounters such code elsewhere.

**Solution**

To solve this issue, either:

* Upgrade the version of your template, or
* Apply the [fix suggested by the .NET team](https://github.com/aspnet/JavaScriptServices/commit/5ed1a35ce0ff373e8a61278a096226b9dc5fe472).

## I cannot export my component to PDF on mobile devices with iOS Safari browser

> The PDF Export module [does not claim to support mobile browsers](https://www.telerik.com/kendo-angular-ui/components/drawing/limitations-browser-support#supported-browsers) and exports may fail completely or be partially broken.

**Cause**

The iOS Safari browser does not support the [`download`](https://caniuse.com/#feat=download) attribute up to version 12.x. As a result, the PDF file is generated, but cannot be saved.

**Solution**

Set up the [server-side proxy](https://www.telerik.com/kendo-angular-ui/components/file-saver/server-proxy).

## I cannot capture the execution context of the current class

**Cause**

The reason for this issue is that the context of `"this"` depends on multiple conditions related to the code structure and the calling context.

**Solution**

Provide the callback as an arrow function to capture the `this` execution context of the class:

```ts
public callBack = (value) => {
    ...
}
```

Alternatively you can explicitly bind `this`:

```ts
constructor() {
    this.callBack = this.callBack.bind(this);
}
```

## Suggested Links

* [Frequently Asked Questions (FAQs)](https://www.telerik.com/kendo-angular-ui/components/faq)
* [Kendo UI for Angular Components](https://www.telerik.com/kendo-angular-ui/components/)
* [All Things Angular Telerik Blog Page](https://www.telerik.com/blogs/all-things-angular)
