Angular JS Conceptual Overview
Conceptual Overview https://docs.angularjs.org/guide/concepts
AngularJS 概念の概要
概念 | 概要 |
---|---|
Template | AngularJS markup '{{ }}' を付加したHTML文書 |
Directives | カスタムDOM要素でHTMLを拡張するもの。ng-model など既に用意されているDirectiveもある。 |
Model | Viewでユーザーへ見せるデータ。ユーザーが影響を与えるデータ。 |
Scope | Controllers,Directives,ExpressionsがModelにアクセスできるように、Modelを保存しておくコンテキスト。$scope.プロパティ のようにModelにアクセスできる。 |
Expressions | 変数や関数にアクセスするときの式。Javascriptと似ている。基本は '{{}}'の中に式を書くが、Directive要素では直接記述できる。 |
Compiler | Templateを解析し、DirectivesとExpressionsをインスタンス化するもの |
Filter | Expressionの値をユーザーに分かりやすいようにフォーマットする。通貨の表記にしたり、特定の文字でフィルターしたりできる。 |
View | ユーザーが見るもの。(DOM) |
Data Binding | ModelとView間でデータを同期する|Controller|the business logic behind views |
Dependency Injection | コンポーネントの依存関係をどのように保持するかを扱うデザインパターン。 |
Injector | Dependency Injection の入れ物 |
Module | アプリの様々なパーツ(controllers, services, filters, directivesなど)の入れ物 |
Service | Viewから独立した再利用できるビジネスロジック |
AngularJS Directives
コンポーネント | 概要 |
---|---|
ngApp | ルートとなるModuleを指定する |
ngController | Viewへ割り当てる Controllerのクラスを指定する |