(docs) devguide glossary - suggestions in comments to PR 280

This commit is contained in:
Ward Bell 2015-10-31 13:05:30 -07:00 committed by Naomi Black
parent 4a00fbe21a
commit 9963a0e027
1 changed files with 28 additions and 16 deletions

View File

@ -51,9 +51,11 @@
.l-sub-section .l-sub-section
:markdown :markdown
We launch an Angular application by "bootstrapping" it with the `bootstrap` method. 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 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 .l-main-section
@ -100,7 +102,7 @@
* [Interpolation](./template-syntax.html#interpolation) * [Interpolation](./template-syntax.html#interpolation)
* [Property Binding](./template-syntax.html#property-binding) * [Property Binding](./template-syntax.html#property-binding)
* [Event Binding](./template-syntax.html#event-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) * [Class Binding](./template-syntax.html#class-binding)
* [Style Binding](./template-syntax.html#style-binding) * [Style Binding](./template-syntax.html#style-binding)
* [Two-way data binding with ng-model](./template-syntax.html#ng-model) * [Two-way data binding with ng-model](./template-syntax.html#ng-model)
@ -109,17 +111,22 @@
[Template Syntax](./template-syntax.html#data-binding) chapter. [Template Syntax](./template-syntax.html#data-binding) chapter.
:markdown :markdown
## Decoration <a id="decorator"></a> <a id="decoration"></a>
## Decorator | Decoration
.l-sub-section .l-sub-section
:markdown :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, Angular has its own set of decorators to help it interoperate with our application parts.
constructor parameter, or a property. 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
We apply a decoration by positioning it of that component.
immediately above or to the left of the thing it decorates The elided object argument to the `@Component` decorator would contain the pertinent component metadata.
as seen here.
``` ```
@Component({...}) @Component({...})
export class AppComponent { export class AppComponent {
@ -128,10 +135,15 @@
name:string; 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 that it decorates. None of the decorations shown here will "leak" to other
classes appearing below it in the file. 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 :markdown
## Dependency Injection ## Dependency Injection
.l-sub-section .l-sub-section
@ -226,7 +238,7 @@
:markdown :markdown
The [official JavaScript language specification](https://en.wikipedia.org/wiki/ECMAScript). 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/) [ECMAScript 2015](http://www.ecma-international.org/ecma-262/6.0/)
(AKA "ES2015" or "ES6") and many Angular 2 developers will write their applications (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 either in this version of the language or a dialect that strives to be
@ -285,7 +297,7 @@
## Interpolation ## Interpolation
.l-sub-section .l-sub-section
:markdown :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 [template expression](#template-expression) between double-curly braces
renders as text. That text may be concatenated with neighboring text renders as text. That text may be concatenated with neighboring text
before it is assigned to an element property before it is assigned to an element property
@ -379,7 +391,7 @@
We write templates in a special [Template Syntax](./template-syntax.html). We write templates in a special [Template Syntax](./template-syntax.html).
:markdown :markdown
## Template Expresion ## Template Expression
.l-sub-section .l-sub-section
:markdown :markdown
An expression in a JavaScript-like syntax that Angular evaluates within An expression in a JavaScript-like syntax that Angular evaluates within
@ -399,7 +411,7 @@
:markdown :markdown
A version of JavaScript that supports most [ECMAScript 2015](#ecmascript=2015) A version of JavaScript that supports most [ECMAScript 2015](#ecmascript=2015)
language features and many features that may arrive in future versions 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 TypeScript is also noteable for its optional typing system which gives
us compile-time type-checking and strong tooling support (e.g. "intellisense", us compile-time type-checking and strong tooling support (e.g. "intellisense",