# Angular Overview (not finished) * 使用 HTML + Typescript 建構**客戶端**應用的平台與框架 * 基本構成要素 : NgModule , 為元件提供了編譯的上下文環境 * 把相關的程式碼收集到一些功能中,至少會有一個用於引導應用的 根模組 * 還會有很多特性模組 * 元素定義**檢視** :::info Components define views, which are sets of screen elements that Angular can choose among and modify according to your program logic and data. ::: * 可見的螢幕元素 * 根據程式邏輯和資料來源選擇修改 * 每個應用至少有一個根元件 * 元件使用**服務** :::info Components use services, which provide specific functionality not directly related to views. Service providers can be injected into components as dependencies, making your code modular, reusable, and efficient. ::: * 服務會提供**與檢視不直接相關的功能** * 服務提供者可以做為**依賴**被**注入**元件 * 可以讓程式碼更加模組化、複用、高效能 --- * 模組、元件和服務都是裝飾器的類別,這裝飾器會標示出它們的型別並提供元資料,告知angular該如何使用它們 :::info Modules, components and services are classes that use decorators. These decorators mark their type and provide metadata that tells Angular how to use them. ::: * 元件類別的原資料將元件類別和一個用來定義檢視的範本關聯起來,範本把普通的 HTML 和 Angular 指令與繫結標記(markup)組合起來,這樣 Angular 就可以在渲染 HTML 之前先修改這些 HTML。 :::info The metadata for a component class associates it with a template that defines a view. A template combines ordinary HTML with Angular directives and binding markup that allow Angular to modify the HTML before rendering it for display. ::: * 服務類別的元資料提供了一些資訊,Angular 要用這些資訊來讓元件可以透過依賴注入(DI)使用該服務。 :::info The metadata for a service class provides the information Angular needs to make it available to components through dependency injection (DI). ::: ###### tags: `Angular`