打开git bash
npm -v
node-v
npm install -g @angular/cli
mkdir Projects
cd Projects
ng new angularapp
cd angularapp
code . 这个意思是用vs code打开这个文件夹
ng serve --open
npm install bootstrap@4.3.1 jquery popper.js
npm install font-awesome --save
在angular.json中找到并添加
"styles": ["src/styles.css", "../node_modules/font-awesome/css/font-awesome.css", "../node_modules/bootstrap/dist/css/bootstrap.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/popper.js/dist/umd/popper.js" ,"../node_modules/bootstrap/dist/js/bootstrap.js"]
----------------------------------------------------------------------------
font-awesome能引入一些好看的icon。
如
<
button
class=
"=btn btn-danger">
<
i
class=
"fa fa-remove"></
i>
</
button>
<
button
class=
"=btn btn-danger">
<
i
class=
"fa fa-pencil"></
i>
</
button>