cmd,进入项目文件下
1、安装jquery
npm install jquery --save。
--save
安装的同时,将信息写入package.json中
2、安装bootstrap
npm install
bootstrap
--save。
3、在.angular-cli.json中添加 jquery和bootstrap的引用
在styles节点和scripts节点下加入。
"styles"
: [
"styles.css"
,
"../node_modules/bootstrapdist/css/bootstrap.css"
],122)">"scripts"
"../node_modules/jquery/dist/jquery.js"
"../node_modules/bootstrap/dist/js/bootstrap.js"
在项目中使用还需要:
4、安装jquery的类型定义文件(*.d.ts)
npm install @types/jquery --save-dev。
5、安装bootstrap的类型定义文件(*.d.ts)
npm install @types/bootstrap --save-dev。
原文地址:https://www.jb51.cc/angularjs/147075.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。