I am hoping to add Slick Library within my DrupalGap but when I try to use it, I am unable to.

The library is added normally within index.html but when one my node page (which has the HTML in it) tries to use it, it doesn't work.

Any idea how to do this correctly.

1 Answer 1


Including the Slick carousel .js file in the index.html file is correct.

You can use the brand the new hook_entity_view_alter to attach a pageshow handler to the node's page:

In the pageshow handler is when you'd initialize the carousel. The pageshow event fires after page is shown to the user. There are a few other hooks you could use to have a chance to place the pageshow event on a node's page within the app:

The hook_entity_view_alter is the most powerful and is brand new, so you need the latest bin/drupalgap.min.js file and the latest jdrupal.min.js file to run it. But that is the hook I'd recommend using

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.