docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
block includes
include _util-fns
//- current.path = ['docs', lang, 'latest', ...]
- var lang = current.path[1]
- var docsPath='/' + current.path[0]
- var docsLatest='/' + current.path.slice(0,3).join('/');
- var _at = lang === 'js' ? '' : '@'
- var _decoratorLink = '<a href="#' + _decorator + '">' + _decorator + '</a>'
2016-03-04 20:56:41 -05:00
:marked
# Angular 2 Glossary
Angular 2 has a vocabulary of its own.
Most Angular 2 terms are everyday English words
with a specific meaning within the Angular system.
We have gathered here the most prominent terms
and a few less familiar ones that have unusual or
unexpected definitions.
[A](#A) [B](#B) [C](#C) [D](#D) [E](#E) [F](#F) [G](#G) [H](#H) [I](#I)
[J](#J) [K](#K) [L](#L) [M](#M) [N](#N) [O](#O) [P](#P) [Q](#Q) [R](#R)
[S](#S) [T](#T) [U](#U) [V](#V) [W](#W) [X](#X) [Y](#Y) [Z](#Z)
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#A
+ifDocsFor('ts')
a#aot
2016-08-08 20:30:05 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Ahead of Time (AOT) Compilation
.l-sub-section
:marked
Angular applications can be compiled by developers at build-time.
2016-08-29 11:37:39 -04:00
By compiling your application using the compiler-cli, `ngc`, you can bootstrap directly
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
to a Module Factory, meaning you don't need to include the Angular compiler in your javascript bundle.
Ahead of Time compiled applications also benefit from decreased load time and increased performance.
2016-08-08 20:30:05 -04:00
2016-08-09 12:38:25 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Angular Module
.l-sub-section
:marked
Helps us organize an application into cohesive blocks of functionality.
An Angular module identifies the components, directives, and pipes that are used by the application
along with the list of external Angular modules that the application needs, such as `FormsModule`.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Every Angular application has an application root module class. By convention the class is
called `AppModule` and resides in a file named `app.component.ts`.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Angular Module](!{docsLatest}/guide/ngmodule.html) chapter for details and examples.
+ifDocsFor('ts|dart')
2016-03-04 20:56:41 -05:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Annotation
.l-sub-section
block annotation-defn
:marked
In practice, a synonym for [Decoration](#decorator).
2016-03-04 20:56:41 -05:00
:marked
## Attribute Directive
.l-sub-section
:marked
A category of [Directive](#directive) that can listen to and modify the behavior of
other HTML elements, attributes, properties, and components. They are usually represented
as HTML attributes, hence the name.
The `ngClass` directive for adding and removing CSS class names is a good example of
an Attribute Directive.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#B
+ifDocsFor('ts|js')
2016-04-27 14:28:22 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Barrel
.l-sub-section
:marked
A barrel is a way to *rollup exports* from several ES2015 modules into a single convenience ES2015 module.
The barrel itself is an ES2015 module file that re-exports *selected* exports of other ES2015 modules.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Imagine three ES2015 modules in a `heroes` folder:
code-example.
// heroes/hero.component.ts
export class HeroComponent {}
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
// heroes/hero.model.ts
export class Hero {}
// heroes/hero.service.ts
export class HeroService {}
:marked
Without a barrel, a consumer would need three import statements:
code-example.
import { HeroComponent } from '../heroes/hero.component.ts';
import { Hero } from '../heroes/hero.model.ts';
import { HeroService } from '../heroes/hero.service.ts';
:marked
We can add a barrel to the `heroes` folder (called `index` by convention) that exports all of these items:
code-example.
export * from './hero.model.ts'; // re-export all of its exports
export * from './hero.service.ts'; // re-export all of its exports
export { HeroComponent } from './hero.component.ts'; // re-export the named thing
:marked
Now a consumer can import what it needs from the barrel.
code-example.
import { Hero, HeroService } from '../heroes'; // index is implied
:marked
The Angular [scoped packages](#scoped-package) each have a barrel named `index`.
That's why we can write this:
+makeExcerpt('quickstart/ts/app/app.component.ts', 'import', '')
.alert.is-important
:marked
Note that you can often achieve this same goal using [Angular modules](#angular-module) instead.
2016-08-09 12:38:25 -04:00
2016-03-04 20:56:41 -05:00
:marked
## Binding
.l-sub-section
:marked
Almost always refers to [Data Binding](#data-binding) and the act of
binding an HTML object property to a data object property.
May refer to a [Dependency Injection](#dependency-injection) binding
between a "token" or "key" and a dependency [provider](#provider).
This more rare usage should be clear in context.
:marked
## Bootstrap
.l-sub-section
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
block bootstrap-defn-top
:marked
We launch an Angular application by "bootstrapping" it using the application root Angular module (`AppModule`).
The bootstraping identifies an application's top level "root" [Component](#component), which is the first
component that is loaded for the application. For more information see the [QuickStart](!{docsLatest}/quickstart.html).
2016-03-04 20:56:41 -05:00
:marked
One can bootstrap multiple apps in the same `index.html`, each with its own top level root.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#C
2016-03-20 20:44:01 -04:00
:marked
## camelCase
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter
_except the first letter which is a lowercase letter_.
2016-03-20 20:44:01 -04:00
Function, property, and method names are typically spelled in camelCase. Examples include: `square`, `firstName` and `getHeroes`.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
2016-03-20 20:44:01 -04:00
This form is also known as **lower camel case**, to distinguish it from **upper camel case** which we call [PascalCase](#pascalcase).
When we write "camelCase" in this documentation we always mean *lower camel case*.
2016-03-04 20:56:41 -05:00
:marked
## Component
.l-sub-section
:marked
An Angular class responsible for exposing data
to a [View](#view) and handling most of the view’ s display
and user-interaction logic.
The Component is one of the most important building blocks in the Angular system.
It is, in fact, an Angular [Directive](#directive) with a companion [Template](#template).
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The developer applies the `!{_at}Component` !{_decoratorLink} to
2016-03-04 20:56:41 -05:00
the component class, thereby attaching to the class the essential component metadata
that Angular needs to create a component instance and render it with its template
as a view.
Those familiar with "MVC" and "MVVM" patterns will recognize
the Component in the role of "Controller" or "View Model".
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#D
2016-03-20 20:44:01 -04:00
:marked
## dash-case
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The practice of writing compound words or phrases such that each word is separated by a dash or hyphen (`-`).
2016-03-20 20:44:01 -04:00
This form is also known as [kebab-case](#kebab-case).
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
[Directive](#directive) selectors (like `my-app`) <span if-docs="ts">and
the root of filenames (such as `hero-list.component.ts`)</span> are often
spelled in dash-case.
2016-03-04 20:56:41 -05:00
:marked
## Data Binding
.l-sub-section
:marked
Applications display data values to a user and respond to user
actions (clicks, touches, keystrokes).
We could push application data values into HTML, attach
event listeners, pull changed values from the screen, and
update application data values ... all by hand.
Or we could declare the relationship between an HTML widget
and an application data source ... and let a data binding
framework handle the details.
Data Binding is that second approach. Angular has a rich
data binding framework with a variety of data binding
operations and supporting declaration syntax.
The many forms of binding include:
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
* [Interpolation](!{docsLatest}/guide/template-syntax.html#interpolation)
* [Property Binding](!{docsLatest}/guide/template-syntax.html#property-binding)
* [Event Binding](!{docsLatest}/guide/template-syntax.html#event-binding)
* [Attribute Binding](!{docsLatest}/guide/template-syntax.html#attribute-binding)
* [Class Binding](!{docsLatest}/guide/template-syntax.html#class-binding)
* [Style Binding](!{docsLatest}/guide/template-syntax.html#style-binding)
* [Two-way data binding with ngModel](!{docsLatest}/guide/template-syntax.html#ng-model)
2016-03-04 20:56:41 -05:00
Learn more about data binding in the
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
[Template Syntax](!{docsLatest}/guide/template-syntax.html#data-binding) chapter.
+ifDocsFor('ts|dart')
a#decorator
a#decoration
:marked
## Decorator | Decoration
.l-sub-section
block decorator-defn
:marked
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.
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 {
constructor(@Inject('SpecialFoo') public foo:Foo) {}
@Input() name:string;
}
```
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
:marked
Always include the parentheses `()` when applying a decorator.
A decorator is a **function** that must be called when applied.
2016-03-04 20:56:41 -05:00
:marked
## Dependency Injection
.l-sub-section
:marked
Dependency Injection is both a design pattern and a mechanism
for creating and delivering parts of an application to other
parts of an application that request them.
Angular developers prefer to build applications by defining many simple parts
that each do one thing well and then wire them together at runtime.
These parts often rely on other parts. An Angular [Component](#component)
part might rely on a service part to get data or perform a calculation. When a
part "A" relies on another part "B", we say that "A" depends on "B" and
that "B" is a dependency of "A".
We can ask a "Dependency Injection System" to create "A"
for us and handle all the dependencies.
If "A" needs "B" and "B" needs "C", the system resolves that chain of dependencies
and returns a fully prepared instance of "A".
Angular provides and relies upon its own sophisticated
[Dependency Injection](dependency-injection.html) system
to assemble and run applications by "injecting" application parts
into other application parts where and when needed.
2016-07-31 11:58:00 -04:00
At the core there is an [`Injector`](#injector) that returns dependency values on request.
2016-03-04 20:56:41 -05:00
The expression `injector.get(token)` returns the value associated with the given token.
A token is an Angular type (`OpaqueToken`). We rarely deal with tokens directly; most
methods accept a class name (`Foo`) or a string ("foo") and Angular converts it
to a token. When we write `injector.get(Foo)`, the injector returns
the value associated with the token for the `Foo` class, typically an instance of `Foo` itself.
Angular makes similar requests internally during many of its operations
2016-07-31 14:28:48 -04:00
as when it creates a [`Component`](#component) for display.
2016-03-04 20:56:41 -05:00
The `Injector` maintains an internal map of tokens to dependency values.
If the `Injector` can't find a value for a given token, it creates
a new value using a `Provider` for that token.
A [Provider](#provider) is a recipe for
creating new instances of a dependency value associated with a particular token.
An injector can only create a value for a given token if it has
a `Provider` for that token in its internal provider registry.
Registering providers is a critical preparatory step.
Angular registers some of its own providers with every injector.
2016-08-09 12:38:25 -04:00
We can register our own providers.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Learn more in the [Dependency Injection](!{docsLatest}/guide/dependency-injection.html) chapter.
2016-03-04 20:56:41 -05:00
:marked
## Directive
.l-sub-section
:marked
An Angular class responsible for creating, re-shaping, and interacting with HTML elements
in the browser DOM. Directives are Angular's most fundamental feature.
A Directive is almost always associated with an HTML element or attribute.
We often refer to such an element or attribute as the directive itself.
When Angular finds a directive in an HTML template,
it creates the matching directive class instance
and gives that instance control over that portion of the browser DOM.
Developers can invent custom HTML markup (e.g., `<my-directive>`) to
associate with their custom directives. They add this custom markup to HTML templates
as if they were writing native HTML. In this way, directives become extensions of
HTML itself.
Directives fall into one of three categories:
1. [Components](#component) that combine application logic with an HTML template to
render application [views]. Components are usually represented as HTML elements.
They are the building blocks of an Angular application and the
developer can expect to write a lot of them.
1. [Attribute Directives](#attribute-directive) that can listen to and modify the behavior of
other HTML elements, attributes, properties, and components. They are usually represented
as HTML attributes, hence the name.
1. [Structural Directives](#structural-directive), a directive responsible for
shaping or re-shaping HTML layout, typically by adding, removing, or manipulating
elements and their children.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#E
2016-03-04 20:56:41 -05:00
:marked
## ECMAScript
.l-sub-section
:marked
The [official JavaScript language specification](https://en.wikipedia.org/wiki/ECMAScript).
The latest approved version of JavaScript is
2016-08-04 07:40:18 -04:00
[ECMAScript 2016](http://www.ecma-international.org/ecma-262/7.0/)
(AKA "ES2016" or "ES7") and many Angular 2 developers will write their applications
2016-03-04 20:56:41 -05:00
either in this version of the language or a dialect that strives to be
compatible with it such as [TypeScript](#typesScript).
2016-08-04 07:40:18 -04:00
Most modern browsers today only support the much older "ECMAScript 5" (AKA ES5) standard.
Applications written in ES2016, ES2015 or one of their dialects must be "[transpiled](#transpile)"
2016-03-04 20:56:41 -05:00
to ES5 JavaScript.
Angular 2 developers may choose to write in ES5 directly.
2016-08-04 07:40:18 -04:00
2016-03-04 20:56:41 -05:00
:marked
## ES2015
.l-sub-section
:marked
2016-09-07 19:48:43 -04:00
Short hand for [ECMAScript](#ecmascript) 2015.
2016-03-04 20:56:41 -05:00
:marked
## ES6
.l-sub-section
:marked
2016-09-07 19:48:43 -04:00
Short hand for [ECMAScript](#ecmascript) 2015.
2016-03-04 20:56:41 -05:00
:marked
## ES5
.l-sub-section
:marked
2016-09-07 19:48:43 -04:00
Short hand for [ECMAScript](#ecmascript) 5, the version of JavaScript run by most modern browsers.
2016-03-04 20:56:41 -05:00
See [ECMAScript](#ecmascript).
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
a#F
a#G
a#H
.l-main-section#I
2016-03-04 20:56:41 -05:00
:marked
## Injector
.l-sub-section
:marked
An object in the Angular [dependency injection system](#dependency-injection)
that can find a named "dependency" in its cache or create such a thing
with a registered [provider](#provider).
:marked
## Input
.l-sub-section
:marked
A directive property that can be the ***target*** of a
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
[Property Binding](!{docsLatest}/guide/template-syntax.html#property-binding).
2016-03-04 20:56:41 -05:00
Data values flow *into* this property from the data source identified
in the template expression to the right of the equal sign.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Template Syntax](!{docsLatest}/guide/template-syntax.html#inputs-outputs) chapter.
2016-03-04 20:56:41 -05:00
:marked
## Interpolation
.l-sub-section
:marked
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
or displayed between element tags as in this example.
code-example(language="html" escape="html").
<label>My current hero is {{hero.name}}</label>
:marked
Learn more about interpolation in the
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
[Template Syntax](!{docsLatest}/guide/template-syntax.html#interpolation) chapter.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#J
2016-03-20 20:44:01 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
+ifDocsFor('ts')
a#jit
2016-08-08 20:30:05 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Just in Time (JIT) Compilation
.l-sub-section
:marked
With Angular _Just in Time_ bootstrapping you compile your components and modules in the browser
and launch the application dynamically. This is a good choice during development.
Consider the [Ahead of Time](#aot) mode for production apps.
2016-08-08 20:30:05 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#K
2016-03-20 20:44:01 -04:00
:marked
## kebab-case
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See [dash-case](#dash-case).
2016-03-20 20:44:01 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#L
2016-03-04 20:56:41 -05:00
:marked
## Lifecycle Hooks
.l-sub-section
:marked
[Directives](#directive) and [Components](#component) have a lifecycle
managed by Angular as it creates, updates and destroys them.
Developers can tap into key moments in that lifecycle by implementing
one or more of the "Lifecycle Hook" interfaces.
Each interface has a single hook method whose name is the interface name prefixed with `ng`.
For example, the `OnInit` interface has a hook method names `ngOnInit`.
Angular calls these hook methods in the following order:
* `ngOnChanges` - called when an [input](#input)/[output](#output) binding values change
* `ngOnInit` - after the first `ngOnChanges`
* `ngDoCheck` - developer's custom change detection
* `ngAfterContentInit` - after component content initialized
* `ngAfterContentChecked` - after every check of component content
* `ngAfterViewInit` - after component's view(s) are initialized
* `ngAfterViewChecked` - after every check of a component's view(s)
* `ngOnDestroy` - just before the directive is destroyed.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Learn more in the [Lifecycle Hooks](!{docsLatest}/guide/lifecycle-hooks.html) chapter.
.l-main-section#M
2016-03-04 20:56:41 -05:00
:marked
## Module
.l-sub-section
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
block module-defn
.alert.is-important
:marked
In Angular, there are two types of modules:
- [Angular modules](#angular-module).
See the [Angular Module](!{docsLatest}/guide/ngmodule.html) chapter for details and examples.
- ES2015 modules as described in this section.
2016-08-09 12:38:25 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Angular apps are modular.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
In general, we assemble our application from many modules, both the ones we write ourselves
and the ones we acquire from others.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
A typical module is a cohesive block of code dedicated to a single purpose.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
A module **exports** something of value in that code, typically one thing such as a class.
A module that needs that thing, **imports** it.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The structure of Angular modules and the import/export syntax
is based on the [ES2015](#es2015) module standard
described [here](http://www.2ality.com/2014/09/es6-modules-final.html).
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
An application that adheres to this standard requires a module loader to
load modules on request and resolve inter-module dependencies.
Angular does not ship with a module loader and does not have a preference
for any particular 3rd party library (although most samples use SystemJS).
Application developers may pick any module library that conforms to the standard
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Modules are typically named after the file in which the exported thing is defined.
The Angular [DatePipe](https://github.com/angular/angular/blob/master/modules/@angular/common/src/pipes/date_pipe.ts)
class belongs to a feature module named `date_pipe` in the file `date_pipe.ts`.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Developers rarely access Angular feature modules directly.
We usually import them from one of the Angular [scoped packages](#scoped-package) such as `@angular/core`.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
a#N
.l-main-section#O
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
+ifDocsFor('ts|js')
2016-08-09 12:38:25 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Observable
.l-sub-section
:marked
We can think of an observable as an array whose items arrive asynchronously over time.
Observables help us manage asynchronous data, such as data coming from a backend service.
Observables are used within Angular itself, including Angular's event system and its http client service.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
To use observables, Angular uses a third-party library called Reactive Extensions (RxJS).
Observables are a proposed feature for ES 2016, the next version of JavaScript.
2016-08-09 12:38:25 -04:00
2016-03-04 20:56:41 -05:00
:marked
## Output
.l-sub-section
:marked
A directive property that can be the ***target*** of an
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
[Event Binding](!{docsLatest}/guide/template-syntax.html#property-binding).
2016-03-04 20:56:41 -05:00
Events stream *out* of this property to the receiver identified
in the template expression to the right of the equal sign.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Template Syntax](!{docsLatest}/guide/template-syntax.html#inputs-outputs) chapter.
.l-main-section#P
2016-03-04 20:56:41 -05:00
2016-03-20 20:44:01 -04:00
:marked
## PascalCase
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter.
2016-08-09 12:38:25 -04:00
Class names are typically spelled in PascalCase. Examples include: `Person` and `HeroDetailComponent`.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
2016-03-20 20:44:01 -04:00
This form is also known as **upper camel case**, to distinguish it from **lower camel case** which we simply call [camelCase](#camelcase).
In this documentation, "PascalCase" means *upper camel case* and "camelCase" means *lower camel case*.
2016-03-04 20:56:41 -05:00
:marked
## Pipe
.l-sub-section
:marked
An Angular pipe is a function that transforms input values to output values for
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
display in a [view](#view). We use the `!{_at}Pipe` !{_decoratorLink}
2016-08-09 12:38:25 -04:00
to associate the pipe function with a name. We can then use that
2016-03-04 20:56:41 -05:00
name in our HTML to declaratively transform values on screen.
Here's an example that uses the built-in `currency` pipe to display
a numeric value in the local currency.
code-example(language="html" escape="html").
<label>Price: </label>{{product.price | currency}}
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Learn more in the chapter on [pipes](!{docsLatest}/guide/pipes.html) .
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
- var _ProviderUrl = docsLatest+'/api/'+(lang == 'dart' ? 'angular2.core' : 'core/index')+'/Provider-class.html'
2016-03-04 20:56:41 -05:00
:marked
## Provider
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
A [Provider](!{_ProviderUrl}) creates a new instance of a dependency for the
[Dependency Injection](#dependency-injection) system.
It relates a lookup token to code — sometimes called a "recipe" —
that can create a dependency value.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
a#Q
.l-main-section#R
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
+ifDocsFor('ts|js')
2016-08-09 12:38:25 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Reactive Forms
.l-sub-section
:marked
A technique for building Angular forms through code in a component.
The alternate technique is [Template-Driven Forms](#template-driven-forms).
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
When building reactive forms:
- The "source of truth" is the component. The validation is defined using code in the component.
- Each control is explicitly created in the component class with `new FormControl()` or with `FormBuilder`.
- The template input elements do *not* use `ngModel`.
- The associated Angular directives are all prefixed with `Form` such as `FormGroup`, `FormControl`, and `FormControlName`.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Reactive forms are powerful, flexible, and great for more complex data entry form scenarios, such as dynamic generation
of form controls.
2016-08-09 12:38:25 -04:00
2016-03-04 20:56:41 -05:00
:marked
## Router
.l-sub-section
:marked
Most applications consist of many screens or [views](#view).
The user navigates among them by clicking links and buttons
and taking other similar actions that cause the application to
replace one view with another.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The Angular [Component Router](!{docsLatest}/guide/router.html) is a richly featured mechanism for configuring
2016-03-04 20:56:41 -05:00
and managing the entire view navigation process including the creation and destruction
of views.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
+ifDocsFor('ts|js')
:marked
In most cases, components becomes attached to a [router](#router) by means
of a `RouterConfig` that defines routes to views.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
A [routing component's](#routing-component) template has a `RouterOutlet` element
where it can display views produced by the router.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Other views in the application likely have anchor tags or buttons with `RouterLink`
directives that users can click to navigate.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Component Router](!{docsLatest}/guide/router.html) chapter to learn more.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
+ifDocsFor('ts|js')
2016-03-04 20:56:41 -05:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## RouterModule
.l-sub-section
:marked
A separate [Angular module](#angular-module) that provides the necessary service providers and directives for navigating through application views.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Component Router](!{docsLatest}/guide/router.html) chapter to learn more.
2016-03-04 20:56:41 -05:00
2016-08-09 12:38:25 -04:00
:marked
## Routing Component
.l-sub-section
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
block routing-component-defn
:marked
An Angular [Component](#component) with a RouterOutlet that displays views based on router navigations.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Component Router](!{docsLatest}/guide/router.html) chapter to learn more.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#S
+ifDocsFor('ts|js')
2016-04-27 14:28:22 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Scoped Package
.l-sub-section
:marked
Angular modules are delivered within *scoped packages* such as `@angular/core`, `@angular/common`, `@angular/platform-browser-dynamic`,
`@angular/http`, and `@angular/router`.
A [*scoped package*](https://docs.npmjs.com/misc/scope) is a way to group related *npm* packages.
We import a scoped package the same way we'd import a *normal* package.
The only difference, from a consumer perspective,
is that the package name begins with the Angular *scope name*, `@angular`.
+makeExcerpt('architecture/ts/app/app.component.ts', 'import', '')
2016-04-27 14:28:22 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
a#snake-case
:marked
## snake_case
2016-06-15 13:49:42 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-sub-section
block snake-case-defn
:marked
The practice of writing compound words or phrases such that each word is separated by an
underscore (`_`). This form is also known as **underscore case**.
2016-04-27 14:28:22 -04:00
2016-08-09 12:38:25 -04:00
:marked
## Service
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Components are great and all, but what do we do with data or logic that are not associated
2016-08-09 12:38:25 -04:00
with a specific view or that we want to share across components? We build services!
Applications often require services such as a hero data service or a logging service.
Our components depend on these services to do the heavy lifting.
A service is a class with a focused purpose.
We often create a service to implement features that are
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
independent from any specific view,
2016-08-09 12:38:25 -04:00
provide share data or logic across components, or encapsulate external interactions.
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Services](!{docsLatest}/tutorial/toh-pt4.html) chapter of the tutorial to learn more.
2016-08-09 12:38:25 -04:00
2016-03-04 20:56:41 -05:00
:marked
## Structural Directive
.l-sub-section
:marked
A category of [Directive](#directive) that can
shape or re-shape HTML layout, typically by adding, removing, or manipulating
elements and their children.
The `ngIf` "conditional element" directive and the `ngFor` "repeater" directive are
good examples in this category.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
See the [Structural Directives](!{docsLatest}/guide/structural-directives.html) chapter to learn more.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
.l-main-section#T
2016-03-04 20:56:41 -05:00
:marked
## Template
.l-sub-section
:marked
A template is a chunk of HTML that Angular uses to render a [view](#view) with
the support and continuing guidance of an Angular [Directive](#directive),
most notably a [Component](#component).
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
We write templates in a special [Template Syntax](!{docsLatest}/guide/template-syntax.html).
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
+ifDocsFor('ts|js')
2016-08-09 12:38:25 -04:00
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
## Template-Driven Forms
.l-sub-section
:marked
A technique for building Angular forms using HTML forms and input elements in the view.
The alternate technique is [Reactive Forms](#reactive-forms).
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
When building template-driven forms:
- The "source of truth" is the template. The validation is defined using attributes on the individual input elements.
- [Two-way binding](#data-binding) with `ngModel` keeps the component model in synchronization with the user's entry into the input elements.
- Behind the scenes, Angular creates a new control for each input element that has a `name` attribute and
two-way binding set up.
- The associated Angular directives are all prefixed with `ng` such as `ngForm`, `ngModel`, and `ngModelGroup`.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Template-driven forms are convenient, quick, and simple and are a good choice for many basic data entry form scenarios.
2016-08-09 12:38:25 -04:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Learn how to build template-driven forms
in the [Forms](!{docsLatest}/guide/forms.html) chapter.
2016-08-09 12:38:25 -04:00
2016-03-04 20:56:41 -05:00
:marked
## Template Expression
.l-sub-section
:marked
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
An expression is a !{_Lang}-like syntax that Angular evaluates within
2016-03-04 20:56:41 -05:00
a [data binding](#data-binding). Learn how to write template expressions
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
in the [Template Syntax](!{docsLatest}/guide/template-syntax.html#template-expressions) chapter.
2016-03-04 20:56:41 -05:00
:marked
## Transpile
.l-sub-section
:marked
The process of transforming code written in one form of JavaScript
(e.g., TypeScript) into another form of JavaScript (e.g., [ES5](#es5)).
:marked
## TypeScript
.l-sub-section
:marked
2016-09-07 19:48:43 -04:00
A version of JavaScript that supports most [ECMAScript](#ecmascript) 2015
2016-03-04 20:56:41 -05:00
language features and many features that may arrive in future versions
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",
code completion, refactoring, and intelligent search). Many code editors
and IDEs support TypeScript either natively or with plugins.
TypeScript is the preferred language for Angular 2 development although
we are welcome to write in other JavaScript dialects such as [ES5](#es5).
Learn more about TypeScript on its [website](http://www.typescriptlang.org/).
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
a#U
.l-main-section#V
2016-03-04 20:56:41 -05:00
:marked
## View
.l-sub-section
:marked
A view is a portion of the screen that displays information and responds
to user actions such as clicks, mouse moves, and keystrokes.
Angular renders a view under the control of one or more [Directives](#directive),
especially [Component](#component) directives and their companion [Templates](#template).
The Component plays such a prominent role that we often
find it convenient to refer to a component as a view.
Views often contain other views and any view might be loaded and unloaded
dynamically as the user navigates through the application, typically
under the control of a [router](#router).
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
a#W
a#X
a#Y
.l-main-section#Z
2016-03-04 20:56:41 -05:00
:marked
## Zone
.l-sub-section
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
block zone-defn
:marked
Zones are a mechanism for encapsulating and intercepting
a JavaScript application's asynchronous activity.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
The browser DOM and JavaScript have a limited number
of asynchronous activities, activities such as DOM events (e.g., clicks),
[promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise), and
[XHR](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)
calls to remote servers.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Zones intercept all of these activities and give a "zone client" the opportunity
to take action before and after the async activity completes.
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Angular runs our application in a zone where it can respond to
asynchronous events by checking for data changes and updating
the information it displays via [data bindings](#data-binding).
2016-03-04 20:56:41 -05:00
docs(glossary): general cleanup and fix links (#2100)
* glossary: replace cached by latest before edits
* docs(glossary): general cleanup and fix links
This commit addresses issues with the glossary for all languages (JS, TS, Dart).
Fixes #1123, #1838, #2036.
This was originally started as post-RC5 Dart resync, but since mixing Harp partials with Jade mixins can be problematic, this commit does a general cleanup of the 3 x 2 = 6 glossary files (found in `{ts,js,dart}/latest/{.,guide}`).
This commit builds upon #2098 (which created the first `ts/_cache` copy of the glossary), but doesn't really depend on it.
* post-review updates
* post-review updates
2016-08-17 20:50:42 -04:00
Learn more about zones in this
[Brian Ford video](https://www.youtube.com/watch?v=3IqtmUscE_U).