Scaffolding

Scaffolding

หลังจากที่สร้าง template ขึ้นมาแล้ว ในการพัฒนาส่วนที่เป็น Web Application (Angular) นั้นจะอยู่ใน ClientApp

Project Structure

ClientApp/
└──src/
    ├── app/
    ├── assets/
    ├── environments/
    ├── favicon.ico
    ├── index.html
    ├── main.ts
    ├── polyfills.ts
    ├── styles.css
    ├── test.ts
    └── web.config

ในไดเรกทอรี่ src/ จะประกอบไปด้วยไฟล์หลาย ๆ ไฟล์ เช่น index.html ไฟล์คอนฟิกต่าง ๆ โฟลเดอร์ assets/ สำหรับเก็บไฟล์และโค้ดของแอพทั้งหมดจะอยู่ใน app/

src/
  └── app/
    ├── core/
    ├── gis/
    ├── home/
    ├── app-routing.module.ts
    ├── app.component.html
    ├── app.component.spec.ts
    ├── app.component.ts
    └── app.module.ts

ในไดเรกทอรี่ src/app/ ประกอบด้วย component และ module ของแอพ ตลอดจนไดเร็กทอรีเพิ่มเติมที่มีคุณสมบัติของแอพ เช่น pages, components, services, ฯลฯ

ซึ่งเราได้ทำการแยกเป็น module เอาไว้และเรียกใช้งานแบบ Lazy-loading modules สำหรับการพัฒนาหลาย ๆ module ในแอพเดียวซึ่ง module ที่ติดมาจะมี gis และ home สามารถดูรายละเอียดการเรียกใช้งานได้ที่ Angular Lazy-loading feature modules