diff --git a/public/docs/ts/latest/guide/glossary.jade b/public/docs/ts/latest/guide/glossary.jade index 2c5dda7828..170dd74c71 100644 --- a/public/docs/ts/latest/guide/glossary.jade +++ b/public/docs/ts/latest/guide/glossary.jade @@ -51,9 +51,11 @@ .l-sub-section :markdown We launch an Angular application by "bootstrapping" it with the `bootstrap` method. - The `bootstrap` method identifies the application's' top level "root" [Component](#component) + The `bootstrap` method identifies an application's top level "root" [Component](#component) and optionally registers service [providers](#provider) with the - [dependency injection system](#dependency-injection). + [dependency injection system](#dependency-injection). + + One can bootstrap multiple apps in the same `index.html`, each with its own top level root. .l-main-section @@ -100,7 +102,7 @@ * [Interpolation](./template-syntax.html#interpolation) * [Property Binding](./template-syntax.html#property-binding) * [Event Binding](./template-syntax.html#event-binding) - * [Attribute Binding](./template-syntax.html#aattribute-binding) + * [Attribute Binding](./template-syntax.html#attribute-binding) * [Class Binding](./template-syntax.html#class-binding) * [Style Binding](./template-syntax.html#style-binding) * [Two-way data binding with ng-model](./template-syntax.html#ng-model) @@ -109,17 +111,22 @@ [Template Syntax](./template-syntax.html#data-binding) chapter. :markdown - ## Decoration + + ## Decorator | Decoration .l-sub-section :markdown - A feature of TypeScript and ES2015. + A Decorator is a **function** that adds metadata to a class, its members (properties, methods) and function arguments. + + Decorators are a JavaScript language [feature](https://github.com/wycats/javascript-decorators), implemented in TypeScript and proposed for ES2016 (AKA ES7). + + We apply a decorator by positioning it + immediately above or to the left of the thing it decorates. - A Decoration is a function that adds Angular metadata to a class, - constructor parameter, or a property. - - We apply a decoration by positioning it - immediately above or to the left of the thing it decorates - as seen here. + Angular has its own set of decorators to help it interoperate with our application parts. + Here is an example of a `@Component` decorator that identifies a + class as an Angular [Component](#component) and an `@Input` decorator applied to a property + of that component. + The elided object argument to the `@Component` decorator would contain the pertinent component metadata. ``` @Component({...}) export class AppComponent { @@ -128,10 +135,15 @@ name:string; } ``` - The scope of a decoration is limited to the language feature + The scope of a decorator is limited to the language feature that it decorates. None of the decorations shown here will "leak" to other classes appearing below it in the file. + .alert.is-important + :markdown + Always include the parentheses `()` when applying a decorator. + A decorator is a **function** that must be called when applied. + :markdown ## Dependency Injection .l-sub-section @@ -226,7 +238,7 @@ :markdown The [official JavaScript language specification](https://en.wikipedia.org/wiki/ECMAScript). - The lastest released version of JavaScript is + The latest approved version of JavaScript is [ECMAScript 2015](http://www.ecma-international.org/ecma-262/6.0/) (AKA "ES2015" or "ES6") and many Angular 2 developers will write their applications either in this version of the language or a dialect that strives to be @@ -285,7 +297,7 @@ ## Interpolation .l-sub-section :markdown - A form of [data binding](#data-binding) in which a + A form of [Property Data Binding](#data-binding) in which a [template expression](#template-expression) between double-curly braces renders as text. That text may be concatenated with neighboring text before it is assigned to an element property @@ -379,7 +391,7 @@ We write templates in a special [Template Syntax](./template-syntax.html). :markdown - ## Template Expresion + ## Template Expression .l-sub-section :markdown An expression in a JavaScript-like syntax that Angular evaluates within @@ -399,7 +411,7 @@ :markdown A version of JavaScript that supports most [ECMAScript 2015](#ecmascript=2015) language features and many features that may arrive in future versions - of JavaScript such as [Decorations](#decoration). + of JavaScript such as [Decorators](#decorator). TypeScript is also noteable for its optional typing system which gives us compile-time type-checking and strong tooling support (e.g. "intellisense",