Description
Issue Report: NguCarousel
Error with Version 7+
Description
When using NguCarouselModule
in our Angular application, we encounter errors when upgrading from version 6 to version 7 or above. The error manifests as follows:
Current Behavior:
- The
ngu-carousel
component is used in the template with[inputs]
and[dataSource]
. - Upgrading from
NguCarousel
version 6 to version 7 or higher results in errors. - Adding
CUSTOM_ELEMENTS_SCHEMA
to theNgModule
schemas resolves the issue, but this workaround is not ideal.
Version Information:
NguCarouselModule
: Version 6 (works as expected)NguCarouselModule
: Version 7 and above (causes errors)- Angular Version: 15
Steps to Reproduce
-
Import
NguCarouselModule
into your Angular module:
import { NguCarouselModule } from '@ngu/carousel'; -
Add
NguCarouselModule
to theimports
array of your Angular module. -
Use the
ngu-carousel
component in the template with[inputs]
and[dataSource]
:
<ngu-carousel [inputs]="carouselConfig" [dataSource]="items"> -
Observe the error in the console.
Expected Behavior
The ngu-carousel
component should work correctly with [inputs]
and [dataSource]
without requiring CUSTOM_ELEMENTS_SCHEMA
.
Actual Behavior
Errors are thrown, and the ngu-carousel
component does not render correctly when using version 7 or above.
Workaround
Adding CUSTOM_ELEMENTS_SCHEMA
to the NgModule
schemas resolves the issue but is not a desirable solution.
Additional Information
-
NgModule Code:
@NgModule({ imports: [ // other imports NguCarouselModule ], // other module properties }) export class YourModule { }
-
Component Template Code:
<ngu-carousel [inputs]="carouselConfig" [dataSource]="items"> <!-- carousel content --> </ngu-carousel>
Request
Please investigate the compatibility issue with NguCarousel
versions 7 and above and provide guidance or a fix to ensure that the component works without requiring CUSTOM_ELEMENTS_SCHEMA
.