我有这个问题,我不知道它来自哪里
错误:
zone.js:199未捕获的TypeError:$(...)。validate不是位于 HTMLDocument。 (script.js:6)在maythThrow(jquery.js:3534) 在处理中(jquery.js:3602) ZoneDelegate.push ../ node_modules / zone.js / dist / zone.js.ZoneDelegate.invokeTask (zone.js:423)在 Zone.push ../ node_modules / zone.js / dist / zone.js.Zone.runTask (zone.js:195)在 push ../ node_modules / zone.js / dist / zone.js.ZoneTask.invokeTask (zone.js:4981)在ZoneTask.invoke(zone.js:487)在计时器(zone.js:2281)
这是angular.json文件
"scripts": [
"./node_modules/jquery/dist/jquery.js",
"./node_modules/bootstrap/dist/js/bootstrap.js" ,
"./node_modules/magnific-popup/dist/jquery.magnific-popup.min.js" ,
"C:/ms-front-web/src/assets/js/script.js"
],
答案 0 :(得分:0)
使用此脚本路径:
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/bootstrap/dist/js/bootstrap.js" ,
"node_modules/magnific-popup/dist/jquery.magnific-popup.min.js" ,
"src/assets/js/script.js"
],