- 創(chuàng)建ng項目
ng new 項目名
- 運行項目
ng serve --open
- 修改端口號
ng serve --port 1234
- 新建組件
ng g component 組件名
- 新建路由模塊
ng g module router
- 創(chuàng)建服務(wù)
ng g service 名稱
- 安裝jquery
npm install jquery --save-dev
- 安裝bootstrap
npm install bootstrap --save-dev
- 安裝項目描述文件
npm install @types/jquery --save-dev
npm install @types/bootstrap --save-dev
- 在ng中引入jquery
import * as $ from 'jquery'
- 搭建node 服務(wù)器
npm init -y
- 安裝node類型文件
npm install @types/node --save
- 在node中引入http模塊
import * as http from 'http'
- 運行node服務(wù)
node hello.js
- 安裝express框架
npm install express --save
- 安裝express類型描述文件
npm install @types/express --save
- 反向代理運行項目
npm run start
- 編譯sass
sass input.scss output.css
- 監(jiān)視文件的改動并更新 CSS
sass --watch input.scss:output.css
- sass監(jiān)聽整個目錄
sass --watch app/sass:public/stylesheets