Angular2 slick carousel

Mehdi Guelloub picture Mehdi Guelloub · Nov 22, 2016 · Viewed 10.1k times · Source

Is there a tutorial to create an ANGULAR2 slick carousel component.

Or at least can anyone help me include jQuery and slick carousel script in ANGULAR2.

Answer

mikedanylov picture mikedanylov · Jan 15, 2017
  1. To install slick over npm you can refer to the original documentation or just run

npm install slick-carousel

in your project directory and npm will resolve jquery dependency as well.

  1. Include jquery and slick libraries
    • If you are using angular-cli, then include libraries in angular-cli.json file: ... "scripts": [ "../node_modules/jquery/dist/jquery.min.js", "../node_modules/slick-carousel/slick/slick.min.js" ], ...
    • also you can include libraries directly in index.html file
    • or use some other options
  2. Refer to another stackoverflow question on how to create a slick-slider component.