Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 5917f07

Browse files
committed
glossary: replace cached by latest before edits
1 parent 05cdc83 commit 5917f07

File tree

1 file changed

+148
-30
lines changed

1 file changed

+148
-30
lines changed

public/docs/ts/_cache/glossary.jade

+148-30
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,31 @@ include _util-fns
2020
// #docregion a1
2121
<a id="A"></a>
2222
// #enddocregion a1
23+
a#aot
2324
.l-main-section
25+
:marked
26+
## Ahead of Time (AOT) Compilation
27+
.l-sub-section
28+
:marked
29+
Angular applications can be compiled by developers at build-time.
30+
By compiling your application using the compiler-cli, `ngc`, you can boostrap directly
31+
to a Module Factory, meaning you don't need to include the Angular compiler in your javascript bundle.
32+
Ahead of Time compiled applications also benefit from decreased load time and increased performance.
33+
34+
.l-main-section
35+
<a id="angular-module"></a>
36+
:marked
37+
## Angular Module
38+
.l-sub-section
39+
:marked
40+
Helps us organize an application into cohesive blocks of functionality.
41+
An Angular module identifies the components, directives, and pipes that are used by the application
42+
along with the list of external Angular modules that the application needs, such as `FormsModule`.
43+
44+
Every Angular application has an application root module class. By convention the class is
45+
called `AppModule` and resides in a file named `app.component.ts`.
46+
47+
See the [Angular Module](/docs/ts/latest/guide/ngmodule.html) chapter for details and examples.
2448
:marked
2549
## Annotation
2650
.l-sub-section
@@ -50,10 +74,10 @@ include _util-fns
5074
## Barrel
5175
.l-sub-section
5276
:marked
53-
A barrel is a way to *rollup exports* from several modules into a single convenience module.
54-
The barrel itself is a module file that re-exports *selected* exports of other modules.
77+
A barrel is a way to *rollup exports* from several ES2015 modules into a single convenience ES2015 module.
78+
The barrel itself is an ES2015 module file that re-exports *selected* exports of other ES2015 modules.
5579

56-
Imagine three modules in a `heroes` folder:
80+
Imagine three ES2015 modules in a `heroes` folder:
5781
code-example.
5882
// heroes/hero.component.ts
5983
export class HeroComponent {}
@@ -81,12 +105,17 @@ include _util-fns
81105
import { Hero, HeroService } from '../heroes'; // index is implied
82106
:marked
83107
The Angular [scoped packages](#scoped-package) each have a barrel named `index`.
108+
84109
// #enddocregion b-c
85110
:marked
86111
That's why we can write this:
87112
+makeExcerpt('quickstart/ts/app/app.component.ts', 'import', '')
88113
// #docregion b-c
89114
115+
.alert.is-important
116+
:marked
117+
Note that you can often achieve this same goal using [Angular modules](#angular-module) instead.
118+
90119
:marked
91120
## Binding
92121
.l-sub-section
@@ -102,10 +131,9 @@ include _util-fns
102131
## Bootstrap
103132
.l-sub-section
104133
:marked
105-
We launch an Angular application by "bootstrapping" it with the `bootstrap` method.
106-
The `bootstrap` method identifies an application's top level "root" [Component](#component)
107-
and optionally registers service [providers](#provider) with the
108-
[dependency injection system](#dependency-injection).
134+
We launch an Angular application by "bootstrapping" it using the application root Angular module (`AppModule`).
135+
The bootstraping identifies an application's top level "root" [Component](#component), which is the first
136+
component that is loaded for the application. For more information see the [QuickStart](/docs/ts/latest/quickstart.html).
109137

110138
One can bootstrap multiple apps in the same `index.html`, each with its own top level root.
111139

@@ -271,9 +299,7 @@ include _util-fns
271299
Registering providers is a critical preparatory step.
272300

273301
Angular registers some of its own providers with every injector.
274-
We can register our own providers. Quite often the best time to register a `Provider`
275-
is when we [bootstrap](#bootstrap) the application.
276-
There are other opportunities to register as well.
302+
We can register our own providers.
277303

278304
Learn more in the [Dependency Injection](/docs/ts/latest/guide/dependency-injection.html) chapter.
279305
:marked
@@ -322,23 +348,17 @@ include _util-fns
322348
The [official JavaScript language specification](https://en.wikipedia.org/wiki/ECMAScript).
323349

324350
The latest approved version of JavaScript is
325-
[ECMAScript 2015](http://www.ecma-international.org/ecma-262/6.0/)
326-
(AKA "ES2015" or "ES6") and many Angular 2 developers will write their applications
351+
[ECMAScript 2016](http://www.ecma-international.org/ecma-262/7.0/)
352+
(AKA "ES2016" or "ES7") and many Angular 2 developers will write their applications
327353
either in this version of the language or a dialect that strives to be
328354
compatible with it such as [TypeScript](#typesScript).
329355

330-
Most modern browsers today only support the prior "ECMAScript 5" (AKA ES5) standard.
331-
Applications written in ES2015 or one of its dialects must be "[transpiled](#transpile)"
356+
Most modern browsers today only support the much older "ECMAScript 5" (AKA ES5) standard.
357+
Applications written in ES2016, ES2015 or one of their dialects must be "[transpiled](#transpile)"
332358
to ES5 JavaScript.
333359

334360
Angular 2 developers may choose to write in ES5 directly.
335-
:marked
336-
## ECMAScript 2015
337-
.l-sub-section
338-
:marked
339-
The latest released version of JavaScript,
340-
[ECMAScript 2015](http://www.ecma-international.org/ecma-262/6.0/)
341-
(AKA "ES2015" or "ES6")
361+
342362
:marked
343363
## ES2015
344364
.l-sub-section
@@ -402,7 +422,16 @@ include _util-fns
402422

403423
<a id="J"></a>
404424

425+
a#jit
405426
.l-main-section
427+
:marked
428+
## Just in Time (JIT) Compilation
429+
.l-sub-section
430+
:marked
431+
With Angular _Just in Time_ bootstrapping you compile your components and modules in the browser
432+
and launch the application dynamically. This is a good choice during development.
433+
Consider the [Ahead of Time](#aot) mode for production apps.
434+
406435
<a id="K"></a>
407436
:marked
408437
## kebab-case
@@ -450,6 +479,14 @@ include _util-fns
450479
:marked
451480
## Module
452481
.l-sub-section
482+
483+
.alert.is-important
484+
:marked
485+
In Angular, there are two types of modules:
486+
- [Angular modules](#angular-module).
487+
See the [Angular Module](/docs/ts/latest/guide/ngmodule.html) chapter for details and examples.
488+
- ES2015 modules as described in this section.
489+
453490
:marked
454491
Angular apps are modular.
455492

@@ -487,6 +524,17 @@ include _util-fns
487524
<a id="N"></a>
488525
<a id="O"></a>
489526
.l-main-section
527+
:marked
528+
## Observable
529+
.l-sub-section
530+
:marked
531+
We can think of an observable as an array whose items arrive asynchronously over time.
532+
Observables help us manage asynchronous data, such as data coming from a backend service.
533+
Observables are used within Angular itself, including Angular's event system and its http client service.
534+
535+
To use observables, Angular uses a third-party library called Reactive Extensions (RxJS).
536+
Observables are a proposed feature for ES 2016, the next version of JavaScript.
537+
490538
:marked
491539
## Output
492540
.l-sub-section
@@ -505,7 +553,7 @@ include _util-fns
505553
.l-sub-section
506554
:marked
507555
The practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter.
508-
Class names are typically spelled in PascalCase. Examples include: `Person` and `Customer`.
556+
Class names are typically spelled in PascalCase. Examples include: `Person` and `HeroDetailComponent`.
509557

510558
This form is also known as **upper camel case**, to distinguish it from **lower camel case** which we simply call [camelCase](#camelcase).
511559
In this documentation, "PascalCase" means *upper camel case* and "camelCase" means *lower camel case*.
@@ -516,7 +564,7 @@ include _util-fns
516564
:marked
517565
An Angular pipe is a function that transforms input values to output values for
518566
display in a [view](#view). We use the `#{atSym}Pipe` !{decorator}
519-
to associate the pipe function with a name. We then can use that
567+
to associate the pipe function with a name. We can then use that
520568
name in our HTML to declaratively transform values on screen.
521569

522570
Here's an example that uses the built-in `currency` pipe to display
@@ -543,6 +591,23 @@ include _util-fns
543591
.l-main-section
544592
<a id="Q"></a>
545593
<a id="R"></a>
594+
<a id="reactive-forms"></a>
595+
:marked
596+
## Reactive Forms
597+
.l-sub-section
598+
:marked
599+
A technique for building Angular forms through code in a component.
600+
The alternate technique is [Template-Driven Forms](#template-driven-forms).
601+
602+
When building reactive forms:
603+
- The "source of truth" is the component. The validation is defined using code in the component.
604+
- Each control is explicitly created in the component class with `new FormControl()` or with `FormBuilder`.
605+
- The template input elements do *not* use `ngModel`.
606+
- The associated Angular directives are all prefixed with `Form` such as `FormGroup`, `FormControl`, and `FormControlName`.
607+
608+
Reactive forms are powerful, flexible, and great for more complex data entry form scenarios, such as dynamic generation
609+
of form controls.
610+
546611
:marked
547612
## Router
548613
.l-sub-section
@@ -555,18 +620,32 @@ include _util-fns
555620
The Angular [Component Router](/docs/ts/latest/guide/router.html) is a richly featured mechanism for configuring
556621
and managing the entire view navigation process including the creation and destruction
557622
of views.
623+
624+
In most cases, components becomes attached to a [router](#router) by means
625+
of a `RouterConfig` that defines routes to views.
626+
627+
A [routing component's](#routing-component) template has a `RouterOutlet` element where it can display views produced by the router.
628+
629+
Other views in the application likely have anchor tags or buttons with `RouterLink` directives that users can click to navigate.
630+
631+
See the [Component Router](/docs/ts/latest/guide/router.html) chapter to learn more.
632+
558633
:marked
559-
## Routing Component
634+
## RouterModule
560635
.l-sub-section
561636
:marked
562-
A [Component](#component) with an attached router.
637+
A separate [Angular module](#angular-module) that provides the necessary service providers and directives for navigating through application views.
563638

564-
In most cases, the component became attached to a [router](#router) by means
565-
of a `#{atSym}RouterConfig` #{decorator} that defined routes to views controlled by this component.
639+
See the [Component Router](/docs/ts/latest/guide/router.html) chapter to learn more.
566640

567-
The component's template has a `RouterOutlet` element where it can display views produced by the router.
641+
<a id="routing-component"></a>
642+
:marked
643+
## Routing Component
644+
.l-sub-section
645+
:marked
646+
An Angular [Component](#component) with a RouterOutlet that displays views based on router navigations.
568647

569-
It likely has anchor tags or buttons with `RouterLink` directives that users can click to navigate.
648+
See the [Component Router](/docs/ts/latest/guide/router.html) chapter to learn more.
570649

571650
<a id="S"></a>
572651
.l-main-section
@@ -587,6 +666,23 @@ include _util-fns
587666
+makeExcerpt('architecture/ts/app/app.component.ts', 'import', '')
588667
// #docregion n-s-2
589668
669+
:marked
670+
## Service
671+
.l-sub-section
672+
:marked
673+
Components are great and all … but what do we do with data or logic that are not associated
674+
with a specific view or that we want to share across components? We build services!
675+
676+
Applications often require services such as a hero data service or a logging service.
677+
Our components depend on these services to do the heavy lifting.
678+
679+
A service is a class with a focused purpose.
680+
We often create a service to implement features that are
681+
independent from any specific view,
682+
provide share data or logic across components, or encapsulate external interactions.
683+
684+
See the [Services](/docs/ts/latest/tutorial/toh-pt4.html) chapter of the tutorial to learn more.
685+
590686
:marked
591687
## Structural Directive
592688
.l-sub-section
@@ -597,6 +693,8 @@ include _util-fns
597693

598694
The `ngIf` "conditional element" directive and the `ngFor` "repeater" directive are
599695
good examples in this category.
696+
697+
See the [Structural Directives](/docs/ts/latest/guide/structural-directives.html) chapter to learn more.
600698
// #enddocregion n-s-2
601699
602700
// #docregion t1
@@ -612,11 +710,31 @@ include _util-fns
612710

613711
We write templates in a special [Template Syntax](/docs/ts/latest/guide/template-syntax.html).
614712

713+
<a id="template-driven-forms"></a>
714+
:marked
715+
## Template-Driven Forms
716+
.l-sub-section
717+
:marked
718+
A technique for building Angular forms using HTML forms and input elements in the view.
719+
The alternate technique is [Reactive Forms](#reactive-forms).
720+
721+
When building template-driven forms:
722+
- The "source of truth" is the template. The validation is defined using attributes on the individual input elements.
723+
- [Two-way binding](#data-binding) with `ngModel` keeps the component model in synchronization with the user's entry into the input elements.
724+
- Behind the scenes, Angular creates a new control for each input element that has a `name` attribute and
725+
two-way binding set up.
726+
- The associated Angular directives are all prefixed with `ng` such as `ngForm`, `ngModel`, and `ngModelGroup`.
727+
728+
Template-driven forms are convenient, quick, and simple and are a good choice for many basic data entry form scenarios.
729+
730+
Learn how to build template-driven forms
731+
in the [Forms](/docs/ts/latest/guide/forms.html) chapter.
732+
615733
:marked
616734
## Template Expression
617735
.l-sub-section
618736
:marked
619-
An expression in a JavaScript-like syntax that Angular evaluates within
737+
An expression is a JavaScript-like syntax that Angular evaluates within
620738
a [data binding](#data-binding). Learn how to write template expressions
621739
in the [Template Syntax](/docs/ts/latest/guide/template-syntax.html#template-expressions) chapter.
622740

0 commit comments

Comments
 (0)