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

Commit c045020

Browse files
committed
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.
1 parent 64afcf2 commit c045020

File tree

7 files changed

+688
-727
lines changed

7 files changed

+688
-727
lines changed

public/docs/dart/latest/glossary.jade

+55-34
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,56 @@
1-
include _util-fns
2-
3-
block var-def
4-
- var fragPath='../../ts/latest/_fragments/';
5-
6-
!=partial(fragPath + 'glossary-intro')
7-
!=partial(fragPath + 'glossary-a1')
8-
!=partial(fragPath + 'glossary-a-2')
9-
!=partial(fragPath + 'glossary-b-c')
10-
!=partial(fragPath + 'glossary-d1')
11-
!=partial(fragPath + 'glossary-d2')
12-
!=partial(fragPath + 'glossary-e1')
13-
!=partial(fragPath + 'glossary-e2')
14-
!=partial(fragPath + 'glossary-f-l')
15-
!=partial(fragPath + 'glossary-m1')
16-
//partial(fragPath + 'glossary-m2') not needed in dart
17-
!=partial(fragPath + 'glossary-n-s-1')
18-
19-
:marked
20-
## snake_case
21-
22-
.l-sub-section
1+
extends ../../ts/_cache/glossary.jade
2+
3+
block includes
4+
include _util-fns
5+
6+
block annotation-defn
7+
:marked
8+
There are different kinds of annotation in Dart. Unqualified use of the
9+
term usually refers to a [_metadata_ annotation][metadata]. A metadata
10+
annotation begins with the character `@`, followed by either a reference
11+
to a compile-time constant (such as [`Component`](#component)) or a call
12+
to a constant constructor. See the [Dart Language Guide][metadata] for
13+
details.
14+
15+
[metadata]: https://www.dartlang.org/guides/language/language-tour#metadata
16+
17+
block bootstrap-defn-top
18+
:marked
19+
We launch an Angular application by "bootstrapping" it with the
20+
[bootstrap][bootstrap] method. The `bootstrap` method identifies an
21+
application's top level "root" [Component](#component) and optionally
22+
registers service [providers](#provider) with the [dependency injection
23+
system](#dependency-injection).
24+
25+
[bootstrap]: !{docsLatest}/api/angular2.platform.browser/bootstrap.html
26+
27+
block decorator-defn
28+
:marked
29+
When used in this guide, these JavaScript terms are taken as synonymous with
30+
[annotation](#annotation).
31+
32+
block module-defn
33+
//- Taken from the Dart Difference in guide/architecture.jade
34+
:marked
35+
In this guide, the term _module_ refers to a Dart compilation unit, such
36+
as a library, or a package. (If a Dart file has no `library` or `part`
37+
directive, then that file itself is a library and thus a compilation
38+
unit.) For more information about compilation units, see
39+
the chapter on "Libraries and Scripts" in the
40+
[Dart Language Specification](https://www.dartlang.org/docs/spec/).
41+
42+
block routing-component-defn
43+
:marked
44+
A [Component](#component) with an attached router.
45+
46+
In most cases, the component became attached to a [router](#router) by means
47+
of a `@RouterConfig` #{decorator} that defined routes to views controlled by this component.
48+
49+
The component's template has a `RouterOutlet` element where it can display views produced by the router.
50+
51+
It likely has anchor tags or buttons with `RouterLink` directives that users can click to navigate.
52+
53+
block append snake-case-defn
2354
:marked
24-
The practice of writing compound words or phrases such that each word is separated by an
25-
underscore (`_`).
26-
27-
Library and file names are often spelled in snake_case. Examples include:
28-
`angular2_tour_of_heroes` and `app_component.dart`.
29-
30-
This form is also known as **underscore case**.
31-
32-
!=partial(fragPath + 'glossary-n-s-2')
33-
!=partial(fragPath + 'glossary-t1')
34-
//partial(fragPath + 'glossary-t2') notneeded in dart
35-
!=partial(fragPath + 'glossary-u-z')
55+
Library and file names are often spelled in snake_case. Examples include:
56+
`angular2_tour_of_heroes` and `app_component.dart`.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
extends ../glossary
22

33
block var-def
4-
- var fragPath='../../../ts/latest/_fragments/';
4+
include ../_util-fns

public/docs/js/latest/glossary.jade

+11-34
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,12 @@
1-
include _util-fns
2-
// From ts/glossary.jade, the folder ts/latest/_fragments is generated which contains a bunch of partial files.
3-
// These partials comprise the glossary,a subset of these partials should be used to generate the glossary for
4-
// __javascript__ under BASICS.
5-
!=partial('../../ts/latest/_fragments/glossary-intro')
6-
//!=partial('../../ts/latest/_fragments/glossary-a-1') not needed in javascript
7-
!=partial('../../ts/latest/_fragments/glossary-a-2')
8-
!=partial('../../ts/latest/_fragments/glossary-b-c')
9-
!=partial('../../ts/latest/_fragments/glossary-d1')
10-
!=partial('../../ts/latest/_fragments/glossary-d2')
11-
!=partial('../../ts/latest/_fragments/glossary-e1')
12-
!=partial('../../ts/latest/_fragments/glossary-e2')
13-
!=partial('../../ts/latest/_fragments/glossary-f-l')
14-
!=partial('../../ts/latest/_fragments/glossary-m1')
15-
!=partial('../../ts/latest/_fragments/glossary-m2')
16-
!=partial('../../ts/latest/_fragments/glossary-n-s')
17-
!=partial('../../ts/latest/_fragments/glossary-t1')
18-
!=partial('../../ts/latest/_fragments/glossary-t2')
19-
!=partial('../../ts/latest/_fragments/glossary-u-z')
1+
extends ../../ts/latest/glossary.jade
202

21-
// NOTE: (ericjim): I am almost certain these lines are doing nothing,
22-
// so instead I use `!=partial` to include the glossary fragments.
23-
//+includeShared('{ts}', 'intro')
24-
//+includeShared('{ts}', 'a2')
25-
//+includeShared('{ts}', 'b-c')
26-
//+includeShared('{ts}', 'd1')
27-
//+includeShared('{ts}', 'd2')
28-
//+includeShared('{ts}', 'e1')
29-
//+includeShared('{ts}', 'e2')
30-
//+includeShared('{ts}', 'f-l')
31-
//+includeShared('{ts}', 'm1')
32-
//+includeShared('{ts}', 'n-s')
33-
//+includeShared('{ts}', 't1')
34-
//+includeShared('{ts}', 't2')
35-
//+includeShared('{ts}', 'u-z')
3+
block includes
4+
include _util-fns
5+
6+
block bootstrap-defn-top
7+
:marked
8+
We launch an Angular application by "bootstrapping" it with the
9+
`bootstrap` method. The `bootstrap` method identifies an
10+
application's top level "root" [Component](#component) and optionally
11+
registers service [providers](#provider) with the [dependency injection
12+
system](#dependency-injection).
+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
!= partial("../glossary")
1+
extends ../glossary
2+
3+
block var-def
4+
include ../_util-fns

0 commit comments

Comments
 (0)