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 17:50:42 -07: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 17:56:41 -08:00
:marked
2017-03-02 12:20:55 -08:00
Angular has its own vocabulary.
Most Angular terms are common English words
2016-03-04 17:56:41 -08:00
with a specific meaning within the Angular system.
2016-09-13 17:56:29 -04:00
This glossary lists the most prominent terms
2016-03-04 17:56:41 -08:00
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 17:50:42 -07:00
.l-main-section#A
2016-11-23 15:20:53 -08:00
a#aot
:marked
2016-12-13 21:17:51 -08:00
## Ahead-of-time (AOT) compilation
2016-11-23 15:20:53 -08:00
.l-sub-section
2016-08-08 17:30:05 -07:00
:marked
2017-03-02 12:20:55 -08:00
You can compile Angular applications at build time.
2016-11-23 15:20:53 -08:00
By compiling your application<span if-docs="ts"> using the compiler-cli, `ngc`</span>, you can bootstrap directly
to a<span if-docs="ts"> module</span> 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 17:30:05 -07:00
2016-11-23 15:20:53 -08:00
+ifDocsFor('ts')
2016-08-09 17:38:25 +01:00
:marked
2016-09-14 16:38:20 -04:00
## Angular module
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 17:50:42 -07:00
.l-sub-section
:marked
2016-09-14 16:38:20 -04:00
Helps you organize an application into cohesive blocks of functionality.
An Angular module identifies the components, directives, and pipes that the application uses along with the list of external Angular modules that the application needs, such as `FormsModule`.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
Every Angular application has an application root-module class. By convention, the class is
2016-10-18 09:08:21 -04:00
called `AppModule` and resides in a file named `app.module.ts`.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
For details and examples, see the [Angular Modules (NgModule)](!{docsLatest}/guide/ngmodule.html) page.
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 17:50:42 -07:00
+ifDocsFor('ts|dart')
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
## Annotation
.l-sub-section
block annotation-defn
:marked
In practice, a synonym for [Decoration](#decorator).
2017-02-06 19:06:13 -08:00
a#attribute-directive
a#attribute-directives
2016-03-04 17:56:41 -08:00
:marked
2017-02-06 19:06:13 -08:00
## Attribute directives
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2016-09-14 16:38:20 -04:00
A category of [directive](#directive) that can listen to and modify the behavior of
2016-03-04 17:56:41 -08:00
other HTML elements, attributes, properties, and components. They are usually represented
as HTML attributes, hence the name.
2017-03-02 12:20:55 -08:00
For example, you can use the `ngClass` directive to add and remove CSS class names.
2016-03-04 17:56:41 -08:00
2017-02-06 19:06:13 -08:00
Learn about them in the [_Attribute Directives_](!{docsLatest}/guide/attribute-directives.html) guide.
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 17:50:42 -07:00
.l-main-section#B
+ifDocsFor('ts|js')
2016-04-27 11:28:22 -07: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 17:50:42 -07:00
## Barrel
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A way to *roll up exports* from several ES2015 modules into a single convenient ES2015 module.
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 17:50:42 -07:00
The barrel itself is an ES2015 module file that re-exports *selected* exports of other ES2015 modules.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
For example, imagine three ES2015 modules in a `heroes` folder:
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 17:50:42 -07:00
code-example.
// heroes/hero.component.ts
export class HeroComponent {}
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
// heroes/hero.model.ts
export class Hero {}
// heroes/hero.service.ts
export class HeroService {}
:marked
2017-03-02 12:20:55 -08:00
Without a barrel, a consumer needs three import statements:
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 17:50:42 -07:00
code-example.
import { HeroComponent } from '../heroes/hero.component.ts';
import { Hero } from '../heroes/hero.model.ts';
import { HeroService } from '../heroes/hero.service.ts';
:marked
2016-09-13 17:56:29 -04:00
You can add a barrel to the `heroes` folder (called `index`, by convention) that exports all of these items:
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 17:50:42 -07:00
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
2016-09-14 16:38:20 -04:00
Now a consumer can import what it needs from the barrel.
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 17:50:42 -07:00
code-example.
import { Hero, HeroService } from '../heroes'; // index is implied
:marked
The Angular [scoped packages](#scoped-package) each have a barrel named `index`.
.alert.is-important
:marked
2017-03-02 12:20:55 -08:00
You can often achieve the same result using [Angular modules](#angular-module) instead.
2016-08-09 17:38:25 +01:00
2016-03-04 17:56:41 -08:00
:marked
## Binding
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
Usually refers to [data binding](#data-binding) and the act of
2016-03-04 17:56:41 -08:00
binding an HTML object property to a data object property.
2017-03-02 12:20:55 -08:00
Sometimes refers to a [dependency-injection](#dependency-injection) binding
between a "token"—also referred to as a "key"—and a dependency [provider](#provider).
When using this more rare usage, be clear in context.
2016-03-04 17:56:41 -08:00
: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 17:50:42 -07:00
block bootstrap-defn-top
:marked
2016-11-21 17:13:21 -08:00
You launch an Angular application by "bootstrapping" it using the application root Angular module (`AppModule`). Bootstrapping identifies an application's top level "root" [component](#component), which is the first component that is loaded for the application.
2016-11-23 15:20:53 -08:00
For more information, see the [Setup](!{docsLatest}/guide/setup.html) page.
2016-03-04 17:56:41 -08:00
:marked
2017-03-02 12:20:55 -08:00
You can bootstrap multiple apps in the same `index.html`, each app with its own top-level root.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
.l-main-section#C
2016-03-20 17:44:01 -07: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 17:50:42 -07:00
The practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter
2016-09-14 16:38:20 -04:00
_except the first letter, which is lowercase_.
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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
Function, property, and method names are typically spelled in camelCase. For example, `square`, `firstName`, and `getHeroes`. Notice that `square` is an example of how you write a single word in camelCase.
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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
camelCase is also known as *lower camel case* to distinguish it from *upper camel case*, or [PascalCase](#pascalcase).
In Angular documentation, "camelCase" always means *lower camel case*.
2016-03-20 17:44:01 -07:00
2017-02-06 19:06:13 -08:00
a#component
2016-03-04 17:56:41 -08:00
:marked
## Component
.l-sub-section
:marked
2016-09-14 16:38:20 -04:00
An Angular class responsible for exposing data to a [view](#view) and handling most of the view’ s display and user-interaction logic.
2016-03-04 17:56:41 -08:00
2016-09-14 16:38:20 -04:00
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).
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
Apply the `!{_at}Component` !{_decoratorLink} to
2016-03-04 17:56:41 -08:00
the component class, thereby attaching to the class the essential component metadata
2017-03-02 12:20:55 -08:00
that Angular needs to create a component instance and render the component with its template
2016-03-04 17:56:41 -08:00
as a view.
Those familiar with "MVC" and "MVVM" patterns will recognize
2016-09-14 16:38:20 -04:00
the component in the role of "controller" or "view model".
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
.l-main-section#D
2016-03-20 17:44:01 -07: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 17:50:42 -07:00
The practice of writing compound words or phrases such that each word is separated by a dash or hyphen (`-`).
2017-03-02 12:20:55 -08:00
This form is also known as kebab-case.
2016-03-20 17:44:01 -07: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 17:50:42 -07: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 17:56:41 -08:00
:marked
2016-09-14 16:38:20 -04:00
## Data binding
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
Applications display data values to a user and respond to user
2017-03-02 12:20:55 -08:00
actions (such as clicks, touches, and keystrokes).
In data binding, you declare the relationship between an HTML widget and data source
and let the framework handle the details.
Data binding is an alternative to manually pushing application data values into HTML, attaching
2016-09-13 17:56:29 -04:00
event listeners, pulling changed values from the screen, and
2017-03-02 12:20:55 -08:00
updating application data values.
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
Angular has a rich data-binding framework with a variety of data-binding
2016-03-04 17:56:41 -08:00
operations and supporting declaration syntax.
2017-03-02 12:20:55 -08:00
Read about the following forms of binding in the [Template Syntax](!{docsLatest}/guide/template-syntax.html) page:
2016-09-13 17:56:29 -04:00
* [Interpolation](!{docsLatest}/guide/template-syntax.html#interpolation).
2016-09-14 16:38:20 -04:00
* [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#ngModel).
2016-09-13 17:56:29 -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 17:50:42 -07:00
+ifDocsFor('ts|dart')
a#decorator
a#decoration
:marked
2016-09-14 16:38:20 -04:00
## Decorator | decoration
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 17:50:42 -07:00
.l-sub-section
block decorator-defn
:marked
2017-03-02 12:20:55 -08:00
A *function* that adds metadata to a class, its members (properties, methods) and function arguments.
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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
Decorators are a JavaScript language [feature](https://github.com/wycats/javascript-decorators), implemented in TypeScript and proposed for ES2016 (also known as ES7).
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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
To apply a decorator, position it immediately above or to the left of the item it decorates.
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 17:50:42 -07:00
2016-09-13 17:56:29 -04:00
Angular has its own set of decorators to help it interoperate with your application parts.
2017-03-02 12:20:55 -08:00
The following example is a `@Component` decorator that identifies a
2016-09-14 16:38:20 -04:00
class as an Angular [component](#component) and an `@Input` decorator applied to the `name` property
2016-09-13 17:56:29 -04:00
of that component. The elided object argument to the `@Component` decorator would contain the pertinent component metadata.
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 17:50:42 -07:00
```
@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
2017-03-02 12:20:55 -08:00
classes that follow it in the file.
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 17:50:42 -07:00
.alert.is-important
:marked
2016-09-13 17:56:29 -04:00
Always include parentheses `()` when applying a decorator.
2016-03-04 17:56:41 -08:00
:marked
2016-09-14 16:38:20 -04:00
## Dependency injection
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A design pattern and mechanism
2016-03-04 17:56:41 -08:00
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
2016-09-13 17:56:29 -04:00
that each do one thing well and then wiring them together at runtime.
2016-03-04 17:56:41 -08:00
2016-09-13 17:56:29 -04:00
These parts often rely on other parts. An Angular [component](#component)
2016-09-14 12:11:53 -04:00
part might rely on a service part to get data or perform a calculation. When
2017-03-02 12:20:55 -08:00
part "A" relies on another part "B," you say that "A" depends on "B" and
that "B" is a dependency of "A."
2016-03-04 17:56:41 -08:00
2016-09-14 16:38:20 -04:00
You can ask a "dependency injection system" to create "A"
2017-03-02 12:20:55 -08:00
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."
2016-03-04 17:56:41 -08:00
Angular provides and relies upon its own sophisticated
2017-03-02 12:20:55 -08:00
dependency-injection system
2016-03-04 17:56:41 -08:00
to assemble and run applications by "injecting" application parts
into other application parts where and when needed.
2017-03-02 12:20:55 -08:00
At the core, an [`injector`](#injector) returns dependency values on request.
2016-03-04 17:56:41 -08:00
The expression `injector.get(token)` returns the value associated with the given token.
2017-03-02 12:20:55 -08:00
A token is an Angular type (`OpaqueToken`). You rarely need to work with tokens directly; most
2016-03-04 17:56:41 -08:00
methods accept a class name (`Foo`) or a string ("foo") and Angular converts it
2016-09-13 17:56:29 -04:00
to a token. When you write `injector.get(Foo)`, the injector returns
2016-03-04 17:56:41 -08:00
the value associated with the token for the `Foo` class, typically an instance of `Foo` itself.
2016-09-14 16:38:20 -04:00
During many of its operations, Angular makes similar requests internally, such as when it creates a [`component`](#component) for display.
2016-03-04 17:56:41 -08: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.
2016-09-14 16:38:20 -04:00
A [provider](#provider) is a recipe for
2016-03-04 17:56:41 -08:00
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
2016-09-14 16:38:20 -04:00
a `provider` for that token in its internal provider registry.
2016-03-04 17:56:41 -08:00
Registering providers is a critical preparatory step.
Angular registers some of its own providers with every injector.
2017-02-06 19:06:13 -08:00
You can register your own providers.
2016-03-04 17:56:41 -08:00
2016-09-14 16:38:20 -04:00
Read more in the [Dependency Injection](!{docsLatest}/guide/dependency-injection.html) page.
2017-02-06 19:06:13 -08:00
a#directive
a#directives
2016-03-04 17:56:41 -08:00
:marked
## Directive
.l-sub-section
:marked
2016-09-13 17:56:29 -04:00
An Angular class responsible for creating, reshaping, and interacting with HTML elements
2017-03-02 12:20:55 -08:00
in the browser DOM. The directive is Angular's most fundamental feature.
A directive is ususally associated with an HTML element or attribute.
This element or attribute is often referred to as the directive itself.
2016-03-04 17:56:41 -08:00
When Angular finds a directive in an HTML template,
it creates the matching directive class instance
2016-09-13 17:56:29 -04:00
and gives the instance control over that portion of the browser DOM.
2016-03-04 17:56:41 -08:00
2016-09-14 16:38:20 -04:00
You can invent custom HTML markup (for example, `<my-directive>`) to
2016-09-13 17:56:29 -04:00
associate with your custom directives. You add this custom markup to HTML templates
as if you were writing native HTML. In this way, directives become extensions of
2016-03-04 17:56:41 -08:00
HTML itself.
2017-03-02 12:20:55 -08:00
Directives fall into one of the following categories:
* [Components](#component) combine application logic with an HTML template to
2017-02-06 19:06:13 -08:00
render application [views](#view). Components are usually represented as HTML elements.
2017-03-02 12:20:55 -08:00
They are the building blocks of an Angular application.
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
1. [Attribute directives](#attribute-directive) can listen to and modify the behavior of
other HTML elements, attributes, properties, and components. They are usually represented
2016-03-04 17:56:41 -08:00
as HTML attributes, hence the name.
2017-03-02 12:20:55 -08:00
1. [Structural directives](#structural-directive) are responsible for
shaping or reshaping HTML layout, typically by adding, removing, or manipulating
elements and their children.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
.l-main-section#E
2016-03-04 17:56:41 -08: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 19:40:18 +08:00
[ECMAScript 2016](http://www.ecma-international.org/ecma-262/7.0/)
2017-03-02 12:20:55 -08:00
(also known as "ES2016" or "ES7"). Many Angular developers write their applications
in ES7 or a dialect that strives to be
2016-09-14 16:38:20 -04:00
compatible with it, such as [TypeScript](#typescript).
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
Most modern browsers only support the much older "ECMAScript 5" (also known as "ES5") standard.
Applications written in ES2016, ES2015, or one of their dialects must be [transpiled](#transpile)
2016-03-04 17:56:41 -08:00
to ES5 JavaScript.
2017-03-02 12:20:55 -08:00
Angular developers can write in ES5 directly.
2016-08-04 19:40:18 +08:00
2016-03-04 17:56:41 -08:00
:marked
## ES2015
.l-sub-section
:marked
2016-09-07 16:48:43 -07:00
Short hand for [ECMAScript](#ecmascript) 2015.
2016-03-04 17:56:41 -08:00
:marked
2017-03-02 12:20:55 -08:00
## ES5
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
Short hand for [ECMAScript](#ecmascript) 5, the version of JavaScript run by most modern browsers.
2016-03-04 17:56:41 -08:00
:marked
2017-03-02 12:20:55 -08:00
## ES6
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
Short hand for [ECMAScript](#ecmascript) 2015.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
a#F
a#G
a#H
.l-main-section#I
2016-03-04 17:56:41 -08:00
:marked
## Injector
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
An object in the Angular [dependency-injection system](#dependency-injection)
that can find a named dependency in its cache or create a dependency
2016-03-04 17:56:41 -08:00
with a registered [provider](#provider).
:marked
## Input
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A directive property that can be the *target* of a
2016-09-14 16:38:20 -04:00
[property binding](!{docsLatest}/guide/template-syntax.html#property-binding) (explained in detail in the [Template Syntax](!{docsLatest}/guide/template-syntax.html) page).
2016-03-04 17:56:41 -08:00
Data values flow *into* this property from the data source identified
in the template expression to the right of the equal sign.
2016-09-14 16:38:20 -04:00
See the [Input and output properties](!{docsLatest}/guide/template-syntax.html#inputs-outputs) section of the [Template Syntax](!{docsLatest}/guide/template-syntax.html) page.
2016-03-04 17:56:41 -08:00
:marked
## Interpolation
.l-sub-section
:marked
2016-09-14 16:38:20 -04:00
A form of [property data binding](#data-binding) in which a
2016-03-04 17:56:41 -08:00
[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
2016-09-13 17:56:29 -04:00
or displayed between element tags, as in this example.
2016-03-04 17:56:41 -08:00
code-example(language="html" escape="html").
<label>My current hero is {{hero.name}}</label>
:marked
2016-09-14 16:38:20 -04:00
Read more about [interpolation](!{docsLatest}/guide/template-syntax.html#interpolation) in the
[Template Syntax](!{docsLatest}/guide/template-syntax.html) page.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
.l-main-section#J
2016-03-20 17:44:01 -07:00
2016-11-23 15:20:53 -08:00
a#jit
:marked
2016-12-13 21:17:51 -08:00
## Just-in-time (JIT) compilation
2016-11-23 15:20:53 -08:00
.l-sub-section
2016-08-08 17:30:05 -07:00
:marked
2017-03-02 12:20:55 -08:00
A bootstrapping method of compiling components<span if-docs="ts"> and modules</span> in the browser
and launching the application dynamically. Just-in-time mode is a good choice during development.
2016-11-23 15:20:53 -08:00
Consider using the [ahead-of-time](#aot) mode for production apps.
2016-08-08 17:30:05 -07: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 17:50:42 -07:00
.l-main-section#K
2016-03-20 17:44:01 -07: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 17:50:42 -07:00
See [dash-case](#dash-case).
2016-03-20 17:44:01 -07: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 17:50:42 -07:00
.l-main-section#L
2016-03-04 17:56:41 -08:00
:marked
2016-09-14 16:38:20 -04:00
## Lifecycle hooks
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2016-09-14 16:38:20 -04:00
[Directives](#directive) and [components](#component) have a lifecycle
2016-09-13 17:56:29 -04:00
managed by Angular as it creates, updates, and destroys them.
2016-03-04 17:56:41 -08:00
2016-09-13 17:56:29 -04:00
You can tap into key moments in that lifecycle by implementing
2016-09-14 16:38:20 -04:00
one or more of the lifecycle hook interfaces.
2016-03-04 17:56:41 -08:00
Each interface has a single hook method whose name is the interface name prefixed with `ng`.
2016-09-13 17:56:29 -04:00
For example, the `OnInit` interface has a hook method named `ngOnInit`.
2016-03-04 17:56:41 -08:00
Angular calls these hook methods in the following order:
2017-03-02 12:20:55 -08:00
* `ngOnChanges`: when an [input](#input)/[output](#output) binding value changes.
* `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 a component's views are initialized.
* `ngAfterViewChecked`: after every check of a component's views.
* `ngOnDestroy`: just before the directive is destroyed.
2016-03-04 17:56:41 -08:00
2016-09-13 17:56:29 -04:00
Read more in the [Lifecycle Hooks](!{docsLatest}/guide/lifecycle-hooks.html) page.
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 17:50:42 -07:00
.l-main-section#M
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
block module-defn
.alert.is-important
:marked
2017-03-02 12:20:55 -08:00
Angular has the following types of modules:
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 17:50:42 -07:00
- [Angular modules](#angular-module).
2016-09-14 16:38:20 -04:00
For details and examples, see the [Angular Modules](!{docsLatest}/guide/ngmodule.html) page.
2016-09-13 17:56:29 -04:00
- ES2015 modules, as described in this section.
2016-08-09 17:38:25 +01:00
:marked
2017-03-02 12:20:55 -08:00
A cohesive block of code dedicated to a single purpose.
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 17:50:42 -07:00
Angular apps are modular.
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
In general, you assemble an application from many modules, both the ones you write and the ones you acquire from others.
A module *exports* something of value in that code, typically one thing such as a class;
a module that needs that class *imports* it.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
The structure of Angular modules and the import/export syntax
2016-09-13 17:56:29 -04:00
is based on the [ES2015 module standard](http://www.2ality.com/2014/09/es6-modules-final.html).
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
An application that adheres to this standard requires a module loader to
2017-03-02 12:20:55 -08:00
load modules on request and resolve inter-module dependencies.
Angular doesn't include a module loader and doesn't have a preference
for any particular third-party library (although most examples use SystemJS).
You can use any module library that conforms to the standard.
2016-03-04 17:56:41 -08: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 17:50:42 -07: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 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
You rarely access Angular feature modules directly. You usually import them from an Angular [scoped package](#scoped-package) such as `@angular/core`.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
a#N
.l-main-section#O
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
+ifDocsFor('ts|js')
2016-08-09 17:38:25 +01: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 17:50:42 -07:00
## Observable
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
An array whose items arrive asynchronously over time.
2016-09-13 17:56:29 -04:00
Observables help you manage asynchronous data, such as data coming from a backend service.
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 17:50:42 -07:00
Observables are used within Angular itself, including Angular's event system and its http client service.
2016-08-09 17:38:25 +01: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 17:50:42 -07:00
To use observables, Angular uses a third-party library called Reactive Extensions (RxJS).
2017-03-02 12:20:55 -08:00
Observables are a proposed feature for ES2016, the next version of JavaScript.
2016-08-09 17:38:25 +01:00
2016-03-04 17:56:41 -08:00
:marked
## Output
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A directive property that can be the *target* of event binding
(read more in the [event binding](!{docsLatest}/guide/template-syntax.html#event-binding)
section of the [Template Syntax](!{docsLatest}/guide/template-syntax.html) page).
2016-03-04 17:56:41 -08:00
Events stream *out* of this property to the receiver identified
in the template expression to the right of the equal sign.
2016-09-14 16:38:20 -04:00
See the [Input and output properties](!{docsLatest}/guide/template-syntax.html#inputs-outputs) section of the [Template Syntax](!{docsLatest}/guide/template-syntax.html) page.
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 17:50:42 -07:00
.l-main-section#P
2016-03-04 17:56:41 -08:00
2016-03-20 17:44:01 -07:00
:marked
## PascalCase
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
The practice of writing individual words, compound words, or phrases such that each word or abbreviation begins with a capital letter.
Class names are typically spelled in PascalCase. For example, `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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
This form is also known as *upper camel case* to distinguish it from *lower camel case* or simply [camelCase](#camelcase).
In this documentation, "PascalCase" means *upper camel case* and "camelCase" means *lower camel case*.
2016-03-20 17:44:01 -07:00
2016-03-04 17:56:41 -08:00
:marked
## Pipe
.l-sub-section
:marked
An Angular pipe is a function that transforms input values to output values for
2017-03-01 09:17:48 -08:00
display in a [view](#view).
2016-03-04 17:56:41 -08:00
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}}
2017-03-01 09:17:48 -08:00
2016-03-04 17:56:41 -08:00
:marked
2017-03-01 09:17:48 -08:00
You can also write your own custom pipes.
2016-09-13 17:56:29 -04:00
Read more in the page on [pipes](!{docsLatest}/guide/pipes.html).
2016-03-04 17:56:41 -08:00
:marked
## Provider
.l-sub-section
:marked
2016-10-01 07:11:21 -07:00
A _provider_ creates a new instance of a dependency for the
2016-09-14 16:38:20 -04:00
[dependency injection](#dependency-injection) system.
2016-09-13 17:56:29 -04:00
It relates a lookup token to code—sometimes called a "recipe"—that can create a dependency value.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
a#Q
.l-main-section#R
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
+ifDocsFor('ts|js')
2016-08-09 17:38:25 +01:00
:marked
2016-09-14 16:38:20 -04:00
## Reactive forms
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 17:50:42 -07:00
.l-sub-section
:marked
A technique for building Angular forms through code in a component.
2017-03-02 12:20:55 -08:00
The alternative technique is [template-driven forms](#template-driven-forms).
2016-08-09 17:38:25 +01: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 17:50:42 -07: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`.
2017-03-02 12:20:55 -08:00
- The associated Angular directives are all prefixed with `Form`, such as `FormGroup`, `FormControl`, and `FormControlName`.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
Reactive forms are powerful, flexible, and a good choice for more complex data-entry form scenarios, such as dynamic generation of form controls.
2016-08-09 17:38:25 +01:00
2016-03-04 17:56:41 -08:00
:marked
## Router
.l-sub-section
:marked
Most applications consist of many screens or [views](#view).
2016-09-13 17:56:29 -04:00
The user navigates among them by clicking links and buttons,
and performing other similar actions that cause the application to
2016-03-04 17:56:41 -08:00
replace one view with another.
2017-03-02 12:20:55 -08:00
The Angular component router is a richly featured mechanism for configuring and managing the entire view navigation process, including the creation and destruction
2016-03-04 17:56:41 -08:00
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 17:50:42 -07:00
+ifDocsFor('ts|js')
:marked
2017-03-02 12:20:55 -08:00
In most cases, components become attached to a router by means
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 17:50:42 -07:00
of a `RouterConfig` that defines routes to views.
2016-08-09 17:38:25 +01: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 17:50:42 -07:00
A [routing component's](#routing-component) template has a `RouterOutlet` element
where it can display views produced by the router.
2016-08-09 17:38:25 +01: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 17:50:42 -07:00
Other views in the application likely have anchor tags or buttons with `RouterLink`
directives that users can click to navigate.
2016-08-09 17:38:25 +01:00
2016-09-14 16:38:20 -04:00
For more information, see the [Routing & Navigation](!{docsLatest}/guide/router.html) page.
2016-08-09 17:38:25 +01: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 17:50:42 -07:00
+ifDocsFor('ts|js')
2016-03-04 17:56:41 -08:00
:marked
2016-09-14 16:38:20 -04:00
## Router module
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 17:50:42 -07:00
.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 17:56:41 -08:00
2016-09-14 16:38:20 -04:00
For more information, see the [Routing & Navigation](!{docsLatest}/guide/router.html) page.
2016-03-04 17:56:41 -08:00
2016-08-09 17:38:25 +01:00
:marked
2016-09-14 16:38:20 -04:00
## Routing component
2016-08-09 17:38:25 +01:00
.l-sub-section
2016-11-23 15:20:53 -08:00
:marked
An Angular [component](#component) with a `RouterOutlet` that displays views based on router navigations.
2016-03-04 17:56:41 -08:00
2016-11-23 15:20:53 -08:00
For more information, see the [Routing & Navigation](!{docsLatest}/guide/router.html) page.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
.l-main-section#S
+ifDocsFor('ts|js')
2016-04-27 11:28:22 -07:00
:marked
2016-09-14 16:38:20 -04:00
## Scoped package
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 17:50:42 -07:00
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A way to group related *npm* packages.
Read more at the [npm-scope](https://docs.npmjs.com/misc/scope) page.
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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
Angular modules are delivered within *scoped packages* such as `@angular/core`,
`@angular/common`, `@angular/platform-browser-dynamic`, `@angular/http`, and `@angular/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 17:50:42 -07:00
2017-03-02 12:20:55 -08:00
Import a scoped package the same way that you import a normal package.
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 17:50:42 -07:00
The only difference, from a consumer perspective,
2017-03-02 12:20:55 -08:00
is that the scoped package name begins with the Angular *scope name*, `@angular`.
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 17:50:42 -07:00
2017-02-02 18:38:17 +00:00
+makeExcerpt('architecture/ts/src/app/app.component.ts', 'import', '')
2016-04-27 11:28:22 -07:00
2016-08-09 17:38:25 +01:00
:marked
## Service
.l-sub-section
:marked
2016-09-13 17:56:29 -04:00
For data or logic that is not associated
with a specific view or that you want to share across components, build services.
2016-08-09 17:38:25 +01:00
Applications often require services such as a hero data service or a logging service.
A service is a class with a focused purpose.
2017-02-06 19:06:13 -08:00
You 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 17:50:42 -07:00
independent from any specific view,
2016-09-13 17:56:29 -04:00
provide shared data or logic across components, or encapsulate external interactions.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
Applications often require services such as a data service or a logging service.
2016-09-14 16:38:20 -04:00
For more information, see the [Services](!{docsLatest}/tutorial/toh-pt4.html) page of the [Tour of Heroes](!{docsLatest}/tutorial/) tutorial.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
a#snake-case
:marked
## snake_case
.l-sub-section
block snake-case-defn
:marked
The practice of writing compound words or phrases such that an
underscore (`_`) separates one word from the next. This form is also known as *underscore case*.
2017-02-06 19:06:13 -08:00
a#structural-directive
a#structural-directives
2017-03-02 12:20:55 -08:00
2016-03-04 17:56:41 -08:00
:marked
2017-02-06 19:06:13 -08:00
## Structural directives
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2016-09-14 16:38:20 -04:00
A category of [directive](#directive) that can
2017-02-06 19:06:13 -08:00
shape or reshape HTML layout, typically by adding and removing elements in the DOM.
The `ngIf` "conditional element" directive and the `ngFor` "repeater" directive are well-known examples.
2016-03-04 17:56:41 -08:00
2017-02-06 19:06:13 -08:00
Read more in the [_Structural Directives_](!{docsLatest}/guide/structural-directives.html) guide.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
.l-main-section#T
2016-03-04 17:56:41 -08:00
:marked
## Template
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A chunk of HTML that Angular uses to render a [view](#view) with
the support and guidance of an Angular [directive](#directive),
2016-09-14 16:38:20 -04:00
most notably a [component](#component).
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
+ifDocsFor('ts|js')
2016-08-09 17:38:25 +01:00
:marked
2016-09-14 16:38:20 -04:00
## Template-driven forms
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 17:50:42 -07:00
.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 17:38:25 +01: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 17:50:42 -07:00
When building template-driven forms:
- The "source of truth" is the template. The validation is defined using attributes on the individual input elements.
2017-03-02 12:20:55 -08:00
- [Two-way binding](#data-binding) with `ngModel` keeps the component model synchronized with the user's entry into the input elements.
2016-09-14 16:38:20 -04:00
- Behind the scenes, Angular creates a new control for each input element, provided you have set up a `name` attribute and two-way binding for each input.
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 17:50:42 -07:00
- The associated Angular directives are all prefixed with `ng` such as `ngForm`, `ngModel`, and `ngModelGroup`.
2016-08-09 17:38:25 +01:00
2017-03-02 12:20:55 -08:00
Template-driven forms are convenient, quick, and simple. They are a good choice for many basic data-entry form scenarios.
2016-08-09 17:38:25 +01:00
2016-09-14 16:38:20 -04:00
Read about how to build template-driven forms
in the [Forms](!{docsLatest}/guide/forms.html) page.
2016-08-09 17:38:25 +01:00
2016-03-04 17:56:41 -08:00
:marked
2016-09-14 16:38:20 -04:00
## Template expression
2016-03-04 17:56:41 -08:00
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A !{_Lang}-like syntax that Angular evaluates within
2016-09-14 16:38:20 -04:00
a [data binding](#data-binding).
2016-09-13 17:56:29 -04:00
Read about how to write template expressions
2017-03-02 12:20:55 -08:00
in the [Template expressions](!{docsLatest}/guide/template-syntax.html#template-expressions) section
of the [Template Syntax](!{docsLatest}/guide/template-syntax.html#) page.
2016-03-04 17:56:41 -08:00
:marked
## Transpile
.l-sub-section
:marked
The process of transforming code written in one form of JavaScript
2017-03-02 12:20:55 -08:00
(such as TypeScript) into another form of JavaScript (such as [ES5](#es5)).
2016-03-04 17:56:41 -08:00
:marked
## TypeScript
.l-sub-section
:marked
2016-11-23 15:20:53 -08:00
A version of JavaScript that supports most [ECMAScript 2015](#es2015)
2016-09-14 16:38:20 -04:00
language features such as [decorators](#decorator).
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
TypeScript is also notable for its optional typing system, which provides
compile-time type checking and strong tooling support (such as "intellisense,"
2016-03-04 17:56:41 -08:00
code completion, refactoring, and intelligent search). Many code editors
and IDEs support TypeScript either natively or with plugins.
2017-03-02 12:20:55 -08:00
TypeScript is the preferred language for Angular development, although
2016-09-13 17:56:29 -04:00
you can use other JavaScript dialects such as [ES5](#es5).
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
Read more about TypeScript at [typescriptlang.org](http://www.typescriptlang.org/).
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
a#U
.l-main-section#V
2016-03-04 17:56:41 -08:00
:marked
## View
.l-sub-section
:marked
2017-03-02 12:20:55 -08:00
A portion of the screen that displays information and responds
2016-03-04 17:56:41 -08:00
to user actions such as clicks, mouse moves, and keystrokes.
2016-09-14 16:38:20 -04:00
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 it's often
2016-09-13 17:56:29 -04:00
convenient to refer to a component as a view.
2016-03-04 17:56:41 -08:00
2017-03-02 12:20:55 -08:00
Views often contain other views. Any view might be loaded and unloaded
2016-03-04 17:56:41 -08:00
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 17:50:42 -07:00
a#W
a#X
a#Y
.l-main-section#Z
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
block zone-defn
:marked
2017-03-02 12:20:55 -08:00
A mechanism for encapsulating and intercepting
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 17:50:42 -07:00
a JavaScript application's asynchronous activity.
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
The browser DOM and JavaScript have a limited number
2017-03-02 12:20:55 -08:00
of asynchronous activities, such as DOM events (for example, clicks),
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 17:50:42 -07:00
[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 17:56:41 -08: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 17:50:42 -07:00
Zones intercept all of these activities and give a "zone client" the opportunity
2016-09-13 17:56:29 -04:00
to take action before and after the async activity finishes.
2016-03-04 17:56:41 -08:00
2016-09-13 17:56:29 -04:00
Angular runs your application in a zone where it can respond to
2017-03-02 12:20:55 -08:00
asynchronous events by checking for data changes and updating
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 17:50:42 -07:00
the information it displays via [data bindings](#data-binding).
2016-03-04 17:56:41 -08: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 17:50:42 -07:00
Learn more about zones in this
[Brian Ford video](https://www.youtube.com/watch?v=3IqtmUscE_U).