Angular学习笔记1--环境搭建

常用命令

Angular CLI安装

npm install -g @angular/cli // 没有权限前面加sudo

确认Angular有没有安装成功

ng v
// 出现下面画面说明安装成功

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.0.4
Node: 8.12.0
OS: win32 x64

新建项目

ng new auction

启动项目

npm start

依赖安装

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

--angular.json中配置
 "styles": [
    "node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
    "node_modules/jquery/dist/jquery.js",
    "node_modules/bootstrap/dist/js/bootstrap.js"
]

猜你喜欢

转载自blog.csdn.net/tj297202234/article/details/83718100