gpt4 book ai didi

jquery - angular 2 wepack元素添加jquery(Bootstrap的JavaScript需要jQuery)

转载 作者:太空宇宙 更新时间:2023-11-04 08:58:09 24 4
gpt4 key购买 nike

我正在使用 angular-cli .net 核心启动器。现在我正在添加自己的 css + javascript 并出现以下错误:

An unhandled exception occurred while processing the request. Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Bootstrap's JavaScript requires jQuery

我已经试过了:

npm install jquery 

+

import $ from 'jquery'; => in app component

如何使用 webpack/angular2 配置 jquery?

谢谢!

最佳答案

安装类型定义:

npm install @types/jquery

关于jquery - angular 2 wepack元素添加jquery(Bootstrap的JavaScript需要jQuery),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42969180/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com