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

Commit 729ca3b

Browse files
committed
docs(quickstart): update per @chalin comments in PR #2762
1 parent ab06b3c commit 729ca3b

File tree

10 files changed

+54
-52
lines changed

10 files changed

+54
-52
lines changed

public/docs/_examples/quickstart/ts/index.1.html

+2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
</style>
1111

1212
<!-- Polyfills for older browsers -->
13+
<!-- #docregion polyfills -->
1314
<script src="node_modules/core-js/client/shim.min.js"></script>
15+
<!-- #docregion polyfills -->
1416

1517
<script src="node_modules/zone.js/dist/zone.js"></script>
1618
<script src="node_modules/reflect-metadata/Reflect.js"></script>
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// #docregion
22
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
33
import { AppModule } from './app.module';
4-
platformBrowserDynamic().bootstrapModule(AppModule);
5-
// #enddocregion
64

7-
/* This file is excluded in plunkers */
5+
platformBrowserDynamic().bootstrapModule(AppModule);

public/docs/ts/latest/guide/appmodule.jade

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
include ../_util-fns
22

33
:marked
4-
An Angular Module class describes how the application parts fit together.
5-
Every application has at least one Angular Module at the _root_ level of the app.
4+
An Angular module class describes how the application parts fit together.
5+
Every application has at least one Angular module, the _root_ module
6+
that you [bootstrap](#main) to launch the application.
67
You can call it anything you want. The conventional name is `AppModule`.
78

89
Most developers start with a simple `AppModule` and evolve it as the application grows.
9-
Here's a bare-bones `AppModule` from the **QuickStart seed** described on the [setup page](setup.html).
10+
Here's a minimal `AppModule` from the **QuickStart seed** described on the [setup page](setup.html).
1011
+makeExample('setup/ts/app/app.module.ts','', 'app/app.module.ts')(format='.')
1112

1213
:marked
1314
After the `import` statements, you come to a class adorned with the
1415
**`@NgModule`** [_decorator_](glossary.html#decorator '"Decorator" explained').
1516

16-
The `@NgModule` decorator identifies `AppModule` as an Angular Module class (also called an `NgModule` class).
17+
The `@NgModule` decorator identifies `AppModule` as an Angular module class (also called an `NgModule` class).
1718
`@NgModule` takes a _metadata_ object that tells Angular how to compile and launch the application.
1819

1920
* **_imports_** &mdash; the `BrowserModule` that this and every application needs to run in a browser.
@@ -52,7 +53,7 @@ a#imports
5253
so you can reference them within _this_ file.
5354
They have nothing to do with Angular and Angular knows nothing about them.
5455

55-
The _module's_ `imports` array tells Angular about specific Angular Modules &mdash; classes decorated with `@NgModule` &mdash;
56+
The _module's_ `imports` array tells Angular about specific Angular modules &mdash; classes decorated with `@NgModule` &mdash;
5657
that the application needs to function properly.
5758
a#declarations
5859
:marked

public/docs/ts/latest/guide/attribute-directives.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ a#write-directive
6565
:marked
6666
### Write the directive code
6767
Follow the [setup](setup.html) instructions for creating a new project
68-
named <ngio-ex path= <ngio-ex path="attribute-directives"></ngio-ex>.
68+
named <span ngio-ex>attribute-directives</span>.
6969

7070
:marked
7171
Create the following source file in the indicated folder with the following code:

public/docs/ts/latest/guide/browser-support.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ table
6666

6767
You compensate by loading polyfill scripts ("polyfills") on the host web page (`index.html`)
6868
that implement missing features in JavaScript.
69-
+makeExample('quickstart/ts/index.html', 'polyfills')(format='.')
69+
+makeExample('quickstart/ts/index.1.html', 'polyfills')(format='.')
7070
:marked
7171
A particular browser may require at least one polyfill to run _any_ Angular application.
7272
You may need additional polyfills for specific features.

public/docs/ts/latest/guide/forms.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ figure.image-display
8686
:marked
8787
## Setup
8888
Follow the [setup](setup.html) instructions for creating a new project
89-
named <ngio-ex path=<ngio-ex path="angular-forms"></ngio-ex>.
89+
named <span ngio-ex>angular-forms</span>.
9090

9191
## Create the Hero Model Class
9292

public/docs/ts/latest/guide/index.jade

+21-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
block includes
22
include ../_util-fns
33

4-
- var langName = current.path[1] == 'ts' ? 'TypeScript' : 'JavaScript'
4+
- var __lang = _docsFor || current.path[1] || 'ts';
5+
- var guideData = public.docs[__lang].latest.guide._data;
6+
- var advancedLandingPage = '';
7+
- for(var page in guideData) {
8+
- if (!guideData[page].basics && !guideData[page].hide) { advancedLandingPage = page; break; }
9+
- }
10+
- var advancedUrl = './' + advancedLandingPage + '.html'
11+
12+
513
:marked
614
This page describes the Angular documentation at a high level.
715
If you're new to Angular, you may want to visit "[Learning Angular](learning-angular.html)" first.
@@ -10,7 +18,6 @@ block includes
1018

1119
The documentation is divided into major thematic sections, each
1220
a collection of pages devoted to that theme.
13-
<br clear="all">
1421

1522
block js-alert
1623

@@ -41,7 +48,7 @@ table(width="100%")
4148
A step-by-step, immersive approach to learning Angular that
4249
introduces the major features of Angular in an application context.
4350
tr(style=top)
44-
td <b><a href="ngmodule.html">Advanced</a></b>
51+
td <b><a href="!{advancedUrl}">Advanced</a></b>
4552
td
4653
:marked
4754
In-depth analysis of Angular features and development practices.
@@ -56,34 +63,25 @@ table(width="100%")
5663
The rest of the pages highlight key points in code rather than explain each step necessary to build the sample.
5764
You can always get the full source through the #{_liveLink}s.
5865

59-
:marked
6066
## Code samples
6167

62-
Each page includes code snippets that you can reuse in your applications.
63-
These snippets are excerpts from a sample application that accompanies the page.
68+
Each page includes code snippets from a sample application that accompanies the page.
69+
You can reuse these snippets in your applications.
6470

65-
block example-links
66-
:marked
67-
Look for a link to a running version of that sample near the top of each page,
68-
such as this <live-example name="architecture"></live-example> from the [Architecture](architecture.html) page.
71+
Look for a link to a running version of that sample, often near the top of the page,
72+
such as this <live-example name="architecture"></live-example> from the [Architecture](architecture.html) page.
73+
The link launches a browser-based, code editor where you can inspect, modify, save, and download the code.
6974

70-
The link launches a browser-based, code editor where you can inspect, modify, save, and download the code.
71-
72-
:marked
7375
## Reference pages
7476

75-
The [Cheat Sheet](cheatsheet.html) lists Angular syntax for common scenarios.
76-
77-
The [Glossary](glossary.html) defines terms that Angular developers should know.
78-
79-
The [Change Log](change-log.html) announces what's new and changed in the documentation..
80-
81-
The [API Reference](../api/) is the authority on every public-facing member of the Angular libraries.
77+
* The [Cheat Sheet](cheatsheet.html) lists Angular syntax for common scenarios.
78+
* The [Glossary](glossary.html) defines terms that Angular developers should know.
79+
* The [Change Log](change-log.html) announces what's new and changed in the documentation.
80+
* The [API Reference](../api/) is the authority on every public-facing member of the Angular libraries.
8281

8382
## Feedback
8483

8584
We welcome feedback!
8685

87-
Use the <a href="https://github.com/angular/angular.io" target="_blank" title="angular docs on github">angular.io Github repository</a> for **documentation** issues and pull requests.
88-
89-
Use the <a href="https://github.com/angular/angular" target="_blank" title="angular source on github">Angular Github repository</a> to report issues with **Angular** itself.
86+
* Use the <a href="!{_ngDocRepoURL}" target="_blank" title="angular docs on github">angular.io Github repository</a> for **documentation** issues and pull requests.
87+
* Use the <a href="!{_ngRepoURL}" target="_blank" title="angular source on github">Angular Github repository</a> to report issues with **Angular** itself.

public/docs/ts/latest/guide/learning-angular.jade

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
block includes
22
include ../_util-fns
33

4-
- var langName = current.path[1] == 'ts' ? 'TypeScript' : 'JavaScript'
54
figure
65
img(src="/resources/images/devguide/intro/people.png" alt="Us" align="left" style="width:200px; margin-left:-40px;margin-right:10px" )
76
:marked
8-
Everyone is different. Everyone learns differently.
9-
7+
Everyone learns differently.
108
You don't have to read the documentation straight through. Most pages stand on their own.
119
Those new to Angular may wish to follow this popular learning path.
12-
<br clear="all">
10+
<br class="l-clear-left">
11+
1312
:marked
1413
1. Take the [*Tour of Heroes* tutorial](../tutorial "Tour of Heroes").
1514

public/docs/ts/latest/guide/setup.jade

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ block includes
22
include ../_util-fns
33

44
:marked
5-
# Trying Angular
5+
## Trying Angular
66

77
Live coding [Quickstart](../quickstart.html) in the browser is a great way to explore Angular.
88
Links on almost every documentation page will open completed samples in the browser where you can
99
play with the code, share your changes with friends, and download and run the code on your own machine.
1010

11-
As much fun as this is
11+
As much fun as this is ...
1212
* you can't ship your app in plunker
1313
* you aren't always online when writing code
1414
* transpiling TypeScript in the browser is slow
1515
* the type support, refactoring, and code completion only work in your local IDE
1616

17-
# Setup a local development environment
17+
## Setup a local development environment
1818

1919
Fortunately, setting up a new project in your local development environment is quick and easy
2020
with the [**QuickStart seed**](https://github.com/angular/quickstart "Install the github QuickStart repo"),
@@ -51,9 +51,9 @@ code-example(language="sh" class="code-shell").
5151

5252
.l-main-section
5353
:marked
54-
## What's different about the QuickStart Seed?
54+
## What's different about the QuickStart seed?
5555

56-
The QuickStart seed contains the same application as the <live-example><i>live code</i> QuickStart</live-example>.
56+
The QuickStart seed contains the same application as the <live-example name="quickstart">QuickStart live example</live-example>.
5757
But there are _many more files_ in the project folder on your machine,
5858
most of which you can [learn about later](setup-systemjs-anatomy.html "Setup Anatomy").
5959

@@ -77,7 +77,7 @@ code-example(language="sh" class="code-shell").
7777
`)(format='.')
7878
:marked
7979
The [QuickStart](../quickstart.html "Angular QuickStart") sample only shows the `AppComponent` file.
80-
it creates the equivalent of `app.module.ts` and `main.ts` internally _for that example only_
80+
It creates the equivalent of `app.module.ts` and `main.ts` internally _for that example only_
8181
so the reader can discover Angular without distraction.
8282

8383
All other guides and cookbooks expect you to have defined these three files explicitly.
@@ -94,24 +94,24 @@ table(width="100%")
9494
td <code>app.component.ts</code>
9595
td
9696
:marked
97-
Defines the same `AppComponent` as the same as one in the [QuickStart](../quickstart.html).
97+
Defines the same `AppComponent` as the one in the [QuickStart](../quickstart.html).
9898
It is the **root** component of what will become a tree of nested components
9999
as the application evolves.
100100
tr
101101
td <code>app.module.ts</code>
102102
td
103103
:marked
104-
Defines the `AppModule`, the [root module](appmodule.html) that tells Angular how to assemble the application.
104+
Defines `AppModule`, the [root module](appmodule.html) that tells Angular how to assemble the application.
105105
Right now it declares only the `AppComponent`.
106-
Soon there will be more components to talk about.
106+
Soon there will be more components to declare.
107107
tr
108108
td <code>main.ts</code>
109109
td
110110
:marked
111-
Compiles the application with the JiT compiler
111+
Compiles the application with the [JiT compiler](../glossary.html#jit)
112112
and [bootstraps](appmodule.html#main) the application to run in the browser.
113113
That's a reasonable choice for the development of most projects and
114-
it's the only viable choice for a sample running in the _live-coding_ environment.
114+
it's the only viable choice for a sample running in a _live-coding_ environment like Plunker.
115115
You'll learn about alternative compiling and deployment options later in the documentation.
116116

117117
.l-main-section

public/docs/ts/latest/quickstart.jade

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ include _util-fns
2222
The message starts with "Hello" and ends with `{{name}}`
2323
which is an Angular [interpolation binding](guide/displaying-data.html) expression.
2424
At runtime, Angular replaces `{{name}}` with the value of the component's `name` property.
25+
2526
Change the component class's `name` property from `'Angular'` to `'World'` and see what happens.
2627

2728
Binding is one of many Angular features you'll discover in this documentation.
@@ -36,7 +37,10 @@ a#typescript
3637
:marked
3738
## TypeScript
3839
This example is written in <a href="http://www.typescriptlang.org/" target="_blank" title="TypeScript">TypeScript</a>,
39-
a strongly-typed, super-set of the latest JavaScript.
40-
TypeScript turns into JavaScript that runs on any modern browser.
40+
a typed super-set of the latest JavaScript.
41+
TypeScript compiles into JavaScript that runs on any modern browser.
4142
Most developers find it delightful which is why most Angular developers write applications in TypeScript.
42-
You can write your application in [other versions of JavaScript](cookbook/ts-to-js.html) if you prefer.
43+
You can write your application in
44+
[other versions of JavaScript](cookbook/ts-to-js.html "TypeScript to JavaScript") or
45+
<a href="" target="_blank" title="Dart">Dart</a> if you prefer.
46+
// will be https://github.com/angular/dart/latest when published

0 commit comments

Comments
 (0)