Skip to content

NguCarousel Error with Version 7+ #510

Open
@rohit-cactus

Description

@rohit-cactus

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:

Error Screenshot:
Screenshot 2024-09-04 at 6 26 22 PM

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 the NgModule 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

  1. Import NguCarouselModule into your Angular module:
    import { NguCarouselModule } from '@ngu/carousel';

  2. Add NguCarouselModule to the imports array of your Angular module.

  3. Use the ngu-carousel component in the template with [inputs] and [dataSource]:
    <ngu-carousel [inputs]="carouselConfig" [dataSource]="items">

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions