Giter Site home page Giter Site logo

Comments (5)

dsitaliM avatar dsitaliM commented on May 25, 2024 4

This has to do with change detection. You can read more about it here. I solved this problem by using the detectChanges() method from ChangeDetectorRef i.e.

constructor(private cdr: ChangeDetectorRef) {}

  ngOnInit() {}

  ngAfterViewInit(): void {
    this.cdr.detectChanges();
  }

You'll need to implement the AfterViewInit interface.

from material2-carousel.

gbrlsnchs avatar gbrlsnchs commented on May 25, 2024

I haven't had this issue myself, so I need to investigate further. Sorry for the inconvenience.

from material2-carousel.

tomschreck avatar tomschreck commented on May 25, 2024

I too am getting this same error. However, I am only implementing the carousel one time inside a component. Any progress on a solution?

This seems like a good reference: https://blog.angularindepth.com/everything-you-need-to-know-about-the-expressionchangedafterithasbeencheckederror-error-e3fd9ce7dbb4

from material2-carousel.

suga0828 avatar suga0828 commented on May 25, 2024

By the way, when @dsitaliM says: You'll need to implement the AfterViewInit interface., he refers to:

import { AfterViewInit } from '@angular/core';

export class YourClass implements OnInit, AfterViewInit {
  ...
}

from material2-carousel.

evandorland avatar evandorland commented on May 25, 2024

That worked for me. Thanks for your support.

from material2-carousel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.