Topic: Can't bind to 'isControls' since it isn't a known property of 'mdb-carousel'.

jimsgroup pro asked 6 years ago


I've just added a carousel to one of my pages, and my unit test is now gettting the following errors. What do I need to do to get the unit tests passing?
Failed: Template parse errors: Can't bind to 'isControls' since it isn't a known property of 'mdb-carousel'. 1. If 'mdb-carousel' is an Angular component and it has 'isControls' input, then verify that it is part of this module. 2. If 'mdb-carousel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" </div> <mdb-carousel [ERROR ->][isControls]="true" [animation]="'slide'" [interval]="1000000"> <ng-container *ngFor="let re"): ng:///DynamicTestModule/PartsReviewComponent.html@5:18 Can't bind to 'animation' since it isn't a known property of 'mdb-carousel'. 1. If 'mdb-carousel' is an Angular component and it has 'animation' input, then verify that it is part of this module. 2. If 'mdb-carousel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" </div> <mdb-carousel [isControls]="true" [ERROR ->][animation]="'slide'" [interval]="1000000"> <ng-container *ngFor="let reviewPaged of busines"): ng:///DynamicTestModule/PartsReviewComponent.html@5:38 Can't bind to 'interval' since it isn't a known property of 'mdb-carousel'. 1. If 'mdb-carousel' is an Angular component and it has 'interval' input, then verify that it is part of this module. 2. If 'mdb-carousel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" </div> <mdb-carousel [isControls]="true" [animation]="'slide'" [ERROR ->][interval]="1000000"> <ng-container *ngFor="let reviewPaged of businessReviewsPaged.list; le"): ng:///DynamicTestModule/PartsReviewComponent.html@5:60 'mdb-slide' is not a known element: 1. If 'mdb-slide' is an Angular component, then verify that it is part of this module. 2. If 'mdb-slide' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("Paged of businessReviewsPaged.list; let index2=index"> <!--First slide--> [ERROR ->]<mdb-slide> <div class="row"> <ng-container *ngFor="let review "): ng:///DynamicTestModule/PartsReviewComponent.html@8:12 'mdb-carousel' is not a known element: 1. If 'mdb-carousel' is an Angular component, then verify that it is part of this module. 2. If 'mdb-carousel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" </div> [ERROR ->]<mdb-carousel [isControls]="true" [animation]="'slide'" [interval]="1000000"> <ng-container "): ng:///DynamicTestModule/PartsReviewComponent.html@5:4

Damian Gemza staff answered 6 years ago


jimsgroup, could you paste here code of your's carousel? Please provide me more informations about your's environment (mdb version, angular / cli version, and others). Best Regards, Damian

Damian Gemza staff answered 6 years ago


Hello jimsgroup, Did you attached NO_ERRORS_SCHEMA to your's app.module.ts? Please check this.
schemas: [ NO_ERRORS_SCHEMA ]

jimsgroup pro commented 6 years ago

Yes, I tried that, and that results in the error: [object ErrorEvent] thrown The test is: beforeEach(() => { fixture = TestBed.createComponent(DetailComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); });


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No
Tags