Kendo UI组件是否兼容Angular 5?Angular版本升级咨询
Hey there! Let's break down your situation clearly:
The older Kendo UI Angular packages you’re currently using (like @progress/kendo-angular-grid@0.16.2, @progress/kendo-angular-buttons@0.20.1, etc.) were built for Angular 2/4 and will NOT be compatible with Angular 5. These versions don’t account for the API changes and dependency requirements introduced in Angular 5, so you’ll run into build errors, dependency conflicts, or runtime bugs if you try to use them together.
What you need to do to fix this:
Upgrade Kendo UI packages to Angular 5-compatible versions
Telerik released updated Kendo UI packages specifically for Angular 5. Look for versions starting from 1.0.0 (this is when they shifted support to Angular 5+). For example:@progress/kendo-angular-gridneeds at least1.0.0@progress/kendo-angular-buttonsneeds at least1.0.0
Each Kendo component’s release notes confirm minimum Angular support, but generally v1.x packages target Angular 5.
Fix mismatched Angular core packages first
Yourpackage.jsonhas a mix of Angular 5 and 2.4 packages, which will cause issues on their own:"@angular/platform-browser-dynamic": "2.4.0", "@angular/compiler-cli": "2.4.0"Update these to
^5.0.0to match the rest of your Angular dependencies.Update supporting dependencies
Packages likerxjsandzone.jsalso need updates to work with Angular 5. Aim forrxjs@^5.5.0andzone.js@^0.8.14or newer.
Step-by-step upgrade commands:
- Uninstall old Kendo packages:
npm uninstall @progress/kendo-angular-buttons @progress/kendo-angular-charts @progress/kendo-angular-dropdowns @progress/kendo-angular-grid @progress/kendo-angular-intl @progress/kendo-angular-layout @progress/kendo-data-query @progress/kendo-drawing - Install Angular 5-compatible Kendo versions:
npm install @progress/kendo-angular-buttons@^1.0.0 @progress/kendo-angular-charts@^1.0.0 @progress/kendo-angular-dropdowns@^1.0.0 @progress/kendo-angular-grid@^1.0.0 @progress/kendo-angular-intl@^1.0.0 @progress/kendo-angular-layout@^1.0.0 @progress/kendo-data-query@^1.0.0 @progress/kendo-drawing@^1.0.0 - Fix mismatched Angular packages:
npm install @angular/platform-browser-dynamic@^5.0.0 @angular/compiler-cli@^5.0.0 - Update rxjs and zone.js:
npm install rxjs@^5.5.0 zone.js@^0.8.14 - Run
npm installto resolve dependencies, then test your build and app functionality.
Quick extra note:
The @telerik/kendo-theme-default package is deprecated — you can remove it since you already have the active @progress/kendo-theme-default in your dependencies. Also, be prepared to adjust some component code, as Kendo’s 1.x versions introduced breaking changes from the old 0.x releases.
内容的提问来源于stack exchange,提问作者user8819437

