Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NG0955, track expression error after updating ngx-owl-carousel-o from v18 to v19 #288

Open
BarisGc opened this issue Dec 20, 2024 · 3 comments

Comments

@BarisGc
Copy link

BarisGc commented Dec 20, 2024

In my Angular 19 project, after updating ngx-owl-carousel-o from version 18 to version 19, I encountered multiple errors in development mode, as shown below, and couldn't resolve them despite trying every possible solution I could think of, except disabling loop: true. It appears that loop: true may be the cause of the issue, though I need this feature. To test this, I force-installed version 18 in my Angular 19 project, and the errors were resolved.

image

my structure:

@if (isBrowser) {
        <owl-carousel-o class="carousel slide" [options]="owlCarouselOptions">
          <!-- alternative-1 -->
          @for (blog of trendBlogs$ | async; track blog.id) {
            <ng-template carouselSlide [id]="blog.id">
              <!-- ... -->
            </ng-template>
          }
          <!-- alternative-2 -->
          <ng-container *ngFor="let blog of trendBlogs$ | async; trackBy:trackByBlogId">
            <ng-template carouselSlide [id]="blog.id">
              <!-- ... -->
            </ng-template></ng-container
          >
        </owl-carousel-o>
      }

my options:

owlCarouselOptions: OwlOptions = {
    loop: true,
    mouseDrag: false,
    touchDrag: true,
    pullDrag: false,
    dots: false,
    navSpeed: 700,
    autoplay: true,
    autoplayTimeout: 3000,
    autoplayHoverPause: true,
    lazyLoad: true,
    autoplaySpeed: 1000,
    autoplayMouseleaveTimeout: 2000,
    nav: true,
    navText: ['<i class="icon-angle-left-solid"></i>', '<i class="icon-angle-right-solid"></i>'],
    responsive: {
      0: {
        items: 2,
        nav: true,
      },
      576: {
        items: 3,
        nav: true,
      },
      768: {
        items: 3,
        nav: true,
      },
      992: {
        items: 4,
        nav: true,
      },
    },
  };
@BarisGc BarisGc changed the title Migration from causes "Track expression resulted in duplicated keys for a given collection" error even if it Track expression error after updating ngx-owl-carousel-o from version 18 to version 19 Dec 20, 2024
@BarisGc BarisGc changed the title Track expression error after updating ngx-owl-carousel-o from version 18 to version 19 Track expression error after updating ngx-owl-carousel-o from v18 to version v19 Dec 20, 2024
@BarisGc BarisGc changed the title Track expression error after updating ngx-owl-carousel-o from v18 to version v19 NG0955, track expression error after updating ngx-owl-carousel-o from v18 to version v19 Dec 20, 2024
@BarisGc BarisGc changed the title NG0955, track expression error after updating ngx-owl-carousel-o from v18 to version v19 NG0955, track expression error after updating ngx-owl-carousel-o from v18 to v19 Dec 20, 2024
@johnsonlin
Copy link

same issue here.

@abdulrehmansafdar
Copy link

same issue

@eduramofo
Copy link

same issue 👁️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants