Gravatar for

Question by AlexShapo, Jan 23, 2018 7:40 PM

Trying to create FacetSlider from Javascript, need help

I just start working with Coveo and I am trying to create FacetSlider and according to this documentation

I have to call Coveo.init(...) method, but it does not work for me for some reasons, no errors in console. How can I find why nothing rendered on the page? can I enable more debugging information? Can I debug it myself?

Or Coveo.init is a wrong way to create a FacetSlider? should I use something else?

Also, it works fine if I do create it using HTML markup, but I need to create it from Javascript.

1 Reply
Gravatar for

Answer by François Lachance-Guillemette, Jan 23, 2018 9:11 PM

Welcome! :)

`Coveo.init`, as specified in the documentation here, is used to initialize the whole framework and must be called on a `CoveoSearchInterface` element.

The Search Interface will be used to drive all the components contained within it, so the `CoveoFacetSlider` component should be put _inside_ a Search Interface.

I would suggest that you follow the JavaScript Search Framework Getting Started Tutorial, it contains a lot of useful information on how the framework works.

Good luck, hope this helps!

Ask a question