Angular學習筆記1--環境搭建
阿新 • • 發佈:2018-11-17
常用命令
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" ]