2 回答
TA贡献2080条经验 获得超4个赞
(ERROR ReferenceError: "KTToggle is not defined") 意味着你没有加载脚本文件toggle.js,
因此,请确保加载所有 Metronic 在 index.html 文件中加载的内容,而不是删除它的导入,默认情况下 Metronic 将这些文件加载到 index.html 中:
<script src="assets/js/global/components/base/util.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/header.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/menu.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/offcanvas.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/scrolltop.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/toggle.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/dialog.js" type="application/javascript"></script>
<script src="assets/js/global/components/base/wizard.js" type="application/javascript"></script>
TA贡献1780条经验 获得超4个赞
对于遇到这个问题的人,寻找答案,在 angular.json 文件中添加对捆绑文件的引用,为我解决了这个问题。
"architect": {
"build": {
...
"options": {
....
"scripts": [
"src/assets/vendors/global/vendors.bundle.js",
"src/assets/js/demo1/scripts.bundle.js"
],
..
}
..
}
添加回答
举报