未接收错误:添加kendo-angular-scheduler中的模板解析错误到app.module



我已经使用此命令添加了kendo-sengular-scheduler:

ng add @progress/kendo-angular-scheduler

我没有在项目中使用此模块(仅安装(。编译代码后,我在Chrome Console中获取以下错误消息:

Uncaught Error: Template parse errors:
Can't bind to 'toggleable' since it isn't a known property of 'button'. (" day of weekDays' kendoButton
                        [style.width.px]="75"
                        [ERROR ->][toggleable]="true"
                        [selected]="isSelected(day)"
                        (sel"): ng:///SchedulerModule/RecurrenceWeekdayRuleEditorComponent.html@8:24
    at syntaxError (compiler.js:215)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:14702)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate

我在做什么错?

和app.modules.ts:

/*angular modules*/
import { BrowserModule } from '@angular/platform-browser';
import { LOCALE_ID, NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms'
import { JwtHelperService } from '@auth0/angular-jwt';
/*custom modules*/
import { HubAdministrationToolModule } from './modules/hub-administration-tool/hub-administration-tool.module';
import { DashboardModule } from './modules/dashboard/dashboard.module';
/* custom routing modules*/
import { AppRoutingModule } from './app.routing.module';

/* library modules*/
import { GridModule } from '@progress/kendo-angular-grid';
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
import { UploadModule } from '@progress/kendo-angular-upload';
import { PopupModule } from '@progress/kendo-angular-popup';
import { SchedulerModule } from '@progress/kendo-angular-scheduler';

/*custom components*/
import { AppComponent } from './app.component';
/* Services */
//import { JWTService } from './authentication/jwt.service';
import { UtilsService } from './services/utils.service';
/* Custom Classes*/
import { ChartsModule } from '@progress/kendo-angular-charts';
import { IntlModule } from '@progress/kendo-angular-intl';

import '@progress/kendo-angular-intl/locales/de/all';
import { LoginComponent } from './login/login.component';
import {AuthenticationService} from './services/authentication.service'
import { AuthService } from './authentication/auth.service';
import { HomeComponent } from './home/home.component';
import { AuthGuardService } from './authentication/auth-guard.service';

@NgModule({
  declarations: [
    AppComponent, AccessDeniedComponent, BadRouteComponent, RedirectComponent, LoginComponent, HomeComponent
  ],
  imports: [
    /*jwtConfig,*/
    BrowserModule,
    FormsModule,
    HubAdministrationToolModule,
    DashboardModule,
    HttpClientModule,
    AppRoutingModule,
    GridModule,
    BrowserAnimationsModule,
    DateInputsModule,
    UploadModule,
    PopupModule,
    ChartsModule,
    IntlModule,
    SchedulerModule,

  ],
  providers: [{ provide: LOCALE_ID, useValue: 'de-DE' }, /*JWTService,*/ 
    UtilsService,
    AuthenticationService,
    AuthService,
    JwtHelperService, 
    AuthGuardService],
    bootstrap: [AppComponent]
})
export class AppModule { }

在我安装了Kendo的其他模块之前,所有这些模块都很好。我该如何解决此问题?

确保在使用它的位置导入和导出Kendo UI模块。

例如使用Kendo UI按钮

// Import the Kendo UI Component
import { ButtonsModule } from '@progress/kendo-angular-buttons';

和导入 buttonsmodule 在您的主模块中

我刚刚将@progress/kendo-angular-buttons软件包从4.1.0更新为4.4.0,而且工作正常。

运行此命令:

npm i @progress/kendo-angular-buttons

最新更新