Angular6引入jquery(三步解决)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38712932/article/details/84331439

首先下载jquery

npm install jquery --save
npm install @types/jquery --save-dev

配置angular.json(注意要写在第一个出现的script中)

 

在所需要的组件的ts中引入jquery

 

这里需要注意在OnInit中加入(初学哈,刚刚解决的)

猜你喜欢

转载自blog.csdn.net/qq_38712932/article/details/84331439
今日推荐