我已将外部脚本包含在脚本属性的 .angular-cli.json 文件中,即
`
"scripts": [
"../src/assets/plugins/jquery/jquery.min.js",
"../src/assets/plugins/popper/popper.min.js",
"../src/assets/plugins/jquery-blockui/jquery.blockui.min.js",
"../src/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js",
"../src/assets/plugins/datatables/jquery.dataTables.min.js",
"../src/assets/plugins/datatables/plugins/bootstrap/dataTables.bootstrap4.min.js",
"../src/assets/js/pages/table/table_data.js",
"../src/assets/js/app.js",
"../src/assets/js/layout.js",
"../src/assets/js/theme-color.js",
"../src/assets/plugins/material/material.min.js",
"../src/assets/js/pages/ui/animations.js",
"../src/assets/plugins/bootstrap/js/bootstrap.min.js",
"../src/assets/plugins/bootstrap-inputmask/bootstrap-inputmask.min.js",
"../src/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js",
"../src/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker-init.js",
"../src/assets/plugins/jquery-tags-input/jquery-tags-input.js",
"../src/assets/plugins/jquery-tags-input/jquery-tags-input-init.js",
],`
启动 Angular 应用程序时,会加载所有脚本。但是当我切换到另一个页面时,脚本不会加载。