在angular-cli.json中定义jquery-ui的解决方案(避免在index.html中添加它)是:
1:导入jquery-ui-dist
npm install jquery jquery-ui-dist
2:在angular-cli.json中添加脚本
"scripts": [ "../node_modules/jquery/dist/jquery.min.js", "../node_modules/jquery-ui-dist/jquery-ui.js" ],

在angular-cli.json中定义jquery-ui的解决方案(避免在index.html中添加它)是:
1:导入jquery-ui-dist
npm install jquery jquery-ui-dist
2:在angular-cli.json中添加脚本
"scripts": [ "../node_modules/jquery/dist/jquery.min.js", "../node_modules/jquery-ui-dist/jquery-ui.js" ],