Reputation: 21
I am running Angular 5.2.4 and installed ngx-carousel "ngx-carousel": "^1.3.5"
What I have:
<ngx-carousel class="banner" [inputs]="carouselBanner" (carouselLoad)="carouselBannerLoad()">
<ngx-item NgxCarouselItem *ngFor="let tile of carouselBannerItems; let i = index;">
<div class="bannerStyle" [style.background]="'url(' + tile + ')'">
<h1>{{i}}</h1>
</div>
</ngx-item>
<button NgxCarouselPrev class="leftRs"><</button>
<button NgxCarouselNext class="rightRs">></button>
I have a template parse errors in the console saying:
Can't bind to 'inputs' since it isn't a known property of 'ngx-carousel'.
If 'ngx-carousel' is an Angular component and it has 'inputs' input, then verify that it is part of this module.
If 'ngx-carousel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
What am I doing wrong?
Upvotes: 0
Views: 3185
Reputation: 579
In app.module.ts add
import { CarouselModule } from 'ngx-bootstrap/carousel';
then in imports add
CarouselModule.forRoot()
You are not importing the modules in the main app.module.ts, thus getting error.
Upvotes: 0
Reputation: 51
You need to import NgxCarouselModule to your module. Then the issue will be solved.
In your module, add in imports section.
Upvotes: 1