Angular — Install

--

  1. Install Node JS

ดาวโหลดได้ที่ https://nodejs.org/en/

2. Insall Angular CLI เปิด Terminal

พิมพ์คำสั่ง sudo npm install -g @angular/cli@latest

หรือ sudo npm install -g @angular/cli

3. พิมพ์ ng เพื่อดูว่าเราลง Angular CLI สำเร็จ ?

ng

ถ้าลงสำเร็จจะได้ ประมาณรูปด้านล่าง

4. กรณีที่มี Project อยู่ให้ Pull SRC มาไว้ที่ Folder และหลังจากนั้นให้

npm install

**กรณีที่ Theme required type script fix version

npm i --save-dev typescript@3.4.5

5. Run app

ng serve --port 4400 -o

**กรณีที่ Run ไม่ได้ให้ Kill process

pkill -9 ng --port 4400

**Check Typescript version

tsc -v

  • *Bug error 4.0.2

กรณี Error แบบนี้

npm install — save — legacy-peer-deps

— Solution(Work)

Downgrade to version 1.5.0 until fix.

-npm uninstall ng2-smart-table

-npm i ng2-smart-table@1.5.0 — save

and make sure to run -npm i ng2-completer — save

--

--

No responses yet