showCarousel() doesn't work

google-assistant

#1

Hello, I’m trying to create a carousel and the app stops responding as soon as it reaches the showCarousel() function and I’m not sure why.

let carousel = new Carousel();
    carousel.addItem(new OptionItem().setTitle("Item 1").setDescription("This is the first item").setImage("https://via.placeholder.com/720x480", "accessibilityText").setKey("Carouselitem1key"));
    carousel.addItem(new OptionItem().setTitle("Item 2").setDescription("This is the second item").setImage("https://via.placeholder.com/720x480", "accessibilityText").setKey("Carouselitem2key"));
    this.$googleAction.showCarousel(carousel); // This doesn't work for some reason! Not sure why

Any suggestions on what to check for?


#2

Its fine. I’ve fixed it. You need the setImage to have all attributes correctly and only then it works.


#3

Thanks for the update! Closing this now.


closed #4