在angular里面使用jQuery和bootstrap
来源:互联网 发布:javascript插件dll 编辑:程序博客网 时间:2024/06/10 13:33
第一步:
1.在你的项目目录下面:npm install jquery --save
--save是将jQuery加入package.json里面
2.在项目目录下面npm install bootstrap --save
安装完成后:
"bootstrap": "^3.3.7","core-js": "^2.4.1","jquery": "^3.2.1",
第二步:
在angular/cli里面将他们加到项目里面:
"styles": [ "styles.css", "../node_modules/bootstrap/dist/css/bootstrap.css"],"scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/bootstrap/dist/js/bootstrap.js" ],
第三步:
安装类型定义文件,因为jQuery和bootstrap是js文件angular用的是typescript,无法编译,必须要安装他们各自对用的类型对应文件
1.npm install @types/jquery --save -dev
2.npm install @types/bootstrap --save -dev
第四步:
将jquery放入assets文件夹
在index.html里面引入相应js
第五步:
在component里面声明,在任何拥戴的地方使用都需要声明
第六步测试是否可以用了
ng g component xx生成叫xx的组件
阅读全文
0 0
- 在angular里面使用jQuery和bootstrap
- 在angular 下使用bootstrap 的datepicker
- 在bootstrap模态框里面使用ueditor
- 如何在Angular中使用jquery
- angular-cli下使用bootstrap
- angular使用bootstrap手动引导
- angular和bootstrap创建分页
- 在react里面使用jquery插件
- 前端bootstrap和jquery使用记录
- oc里使用JQuery 和 bootstrap
- angualr js中的angular.bootstrap的使用
- angular使用bootstrap方法手动启动
- angular-bootstrap
- angular.bootstrap
- angular + bootstrap
- angular里面使用带标签的文本
- 在Vue项目中使用npm安装bootstrap以及jquery
- 使用Angular 4、Bootstrap 4、TypeScript和ASP.NET Core开发的Apworks框架案例应用
- ウェブに時計を表す
- 护照证件识别OCR多种模式
- POJ1611 The Suspects (并查集)
- FFmpeg.exe 常用的命令
- 二路归并非递归排序Java实现
- 在angular里面使用jQuery和bootstrap
- Chess(组合数,逆元)
- 事务隔离级别与锁机制的实现
- MySQL之备份和还原
- 最优布线问题
- 1.1计算机组成原理概述
- Eclipse+Maven创建webapp项目,并使用
- 日期处理——日期差值
- BZOJ 1426 浅谈手推期望转移方程