Import 3rd party javascript libraries in Angular single components
问题 I'm currently developing an Angular4 application and I want to import some javascript libraries but just for a single component . Currently I can easily import this libraries by defining their paths inside .angular-cli.json like that: { "scripts": [ "../node_modules/jquery/dist/jquery.min.js", "../node_modules/jqueryui/jquery-ui.js", "../src/assets/js/jquery/cometd/org-cometd.js", "../src/assets/js/jquery/cometd/jquery.cometd.js", ], ... } However, the mentioned scripts will be imported for