Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在JHipster Angular 2应用程序中添加来自本地系统的自定义JS文件_Jhipster_Angular2 Directives - Fatal编程技术网

在JHipster Angular 2应用程序中添加来自本地系统的自定义JS文件

在JHipster Angular 2应用程序中添加来自本地系统的自定义JS文件,jhipster,angular2-directives,Jhipster,Angular2 Directives,你们能建议我如何在应用程序中添加本地js文件吗 我尝试在index.html中添加本地JS文件路径,如下所示 <script src="thirdpartyscripts/amcharts.js"></script> 这里是我的目录。 但得到的错误如下 将此文件夹和文件复制到目标/www文件夹中。或者也可以在webpack.commons.js中使用webpack为您执行此操作。请看我添加的最后一行 new CopyWebpackPlugin([

你们能建议我如何在应用程序中添加本地js文件吗

我尝试在
index.html
中添加本地JS文件路径,如下所示

<script src="thirdpartyscripts/amcharts.js"></script>

这里是我的目录。 但得到的错误如下


将此文件夹和文件复制到目标/www文件夹中。或者也可以在webpack.commons.js中使用webpack为您执行此操作。请看我添加的最后一行

new CopyWebpackPlugin([
            { from: './node_modules/core-js/client/shim.min.js', to: 'core-js-shim.min.js' },
            { from: './node_modules/swagger-ui/dist', to: 'swagger-ui/dist' },
            { from: './src/main/webapp/swagger-ui/', to: 'swagger-ui' },
            { from: './src/main/webapp/favicon.ico', to: 'favicon.ico' },
            { from: './src/main/webapp/manifest.webapp', to: 'manifest.webapp' },
            // { from: './src/main/webapp/sw.js', to: 'sw.js' },
            { from: './src/main/webapp/robots.txt', to: 'robots.txt' },
            { from: './src/main/webapp/thirdparty/sth.js', to: 'thirdparty/sth.js' }
        ]),

在组件文件中导入该文件