Angular4 can’t find Jquery-UI functions

The solution to define jquery-ui in angular-cli.json (and avoid to add it in index.html) is:

1 : Import jquery-ui-dist

    npm install jquery jquery-ui-dist

2: Add scripts in angular-cli.json

    "scripts": [
       "../node_modules/jquery/dist/jquery.min.js",
       "../node_modules/jquery-ui-dist/jquery-ui.js"
    ],

Source :
https://stackoverflow.com/a/38795318

Leave a Comment