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

Commit 8fd0235

Browse files
committed
docs(quickstart): incorporate more Igor feedback
1 parent 1a8de8c commit 8fd0235

File tree

17 files changed

+126
-73
lines changed

17 files changed

+126
-73
lines changed

public/_includes/_next-item.jade

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
- var currentPage = false
22
- var nextPage = false
3+
- var hideNextPage = false;
4+
35
- var data = public.docs[current.path[1]][current.path[2]][current.path[3]]._data
46

57
for page, slug in data
68

79
// CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE
810
if currentPage
911
if !nextPage && page.nextable && !page.hide
10-
.l-sub-section
11-
h3 Next Step
12-
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
12+
if !hideNextPage
13+
.l-sub-section
14+
h3 Next Step
15+
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
1316

1417
//NEXT PAGE HAS NOW BEEN SET
1518
- var nextPage = true
1619

20+
- hideNextPage = page.hideNextPage
21+
1722
// SET CURRENT PAGE FLAG WHEN YOU PASS IT
1823
if current.path[4] == slug
1924
- var currentPage = true

public/docs/_examples/setup/ts/plnkr.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"app/main.ts",
77
"index.html"
88
],
9+
"open": "app/app.component.ts",
910
"tags": ["quickstart setup"]
1011
}

public/docs/ts/latest/_data.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"icon": "query-builder",
2020
"title": "Quickstart",
2121
"subtitle": "TypeScript",
22-
"description": "Get up and running with Angular",
23-
"banner": "See Angular in action."
22+
"description": "Discover Angular",
23+
"banner": "Discover Angular in a live-coding environment."
2424
},
2525

2626
"tutorial": {

public/docs/ts/latest/guide/_data.json

+11-6
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@
77
"basics": true
88
},
99

10+
"setup": {
11+
"title": "Setup for local development",
12+
"navTitle": "Setup",
13+
"intro": "Install the Angular QuickStart seed for faster, more efficient development on your machine",
14+
"nextable": true,
15+
"hideNextPage": true,
16+
"basics": true
17+
},
18+
1019
"learning-angular": {
1120
"title": "Learning Angular",
1221
"navTitle": "Learning Angular",
1322
"intro": "A suggested path through the documentation for Angular newcomers",
1423
"nextable": true,
24+
"hideNextPage": true,
1525
"basics": true
1626
},
1727

@@ -23,6 +33,7 @@
2333
"basics": true
2434
},
2535

36+
2637
"appmodule": {
2738
"title": "AppModule: the root module",
2839
"navTitle": "The Root Module",
@@ -152,12 +163,6 @@
152163
"intro": "Developing for content security in Angular applications"
153164
},
154165

155-
"setup": {
156-
"title": "Setup for local development",
157-
"navTitle": "Setup",
158-
"intro": "Install the Angular QuickStart seed for faster, more efficient development on your machine"
159-
},
160-
161166
"setup-systemjs-anatomy": {
162167
"title": "Setup Anatomy",
163168
"intro": "Inside the local development environment for SystemJS"

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ include ../_util-fns
66
that you [bootstrap](#main) to launch the application.
77
You can call it anything you want. The conventional name is `AppModule`.
88

9-
Most developers start with a simple `AppModule` and evolve it as the application grows.
10-
Here's a minimal `AppModule` from the **QuickStart seed** described on the [setup page](setup.html).
9+
The [setup](setup.html) instructions produce a new project with the following minimal `AppModule`.
10+
You'll evolve this module as your application grows.
11+
1112
+makeExample('setup/ts/app/app.module.ts','', 'app/app.module.ts')(format='.')
1213

1314
:marked
@@ -22,7 +23,7 @@ include ../_util-fns
2223
* **_bootstrap_** — the _root_ component that Angular creates and inserts into the `index.html` host web page.
2324

2425
The [Angular Modules (NgModules)](ngmodule.html) guide dives deeply into the details of Angular modules.
25-
All you need to know at the moment is a few basics about these three properties.
26+
All you need to know at the moment is a few basics about these three properties.
2627

2728
a#imports
2829
:marked

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ a#directive-overview
2929
1. Attribute directives—change the appearance or behavior of an element.
3030

3131
*Components* are the most common of the three directives.
32-
You saw a component for the first time in the [QuickStart](../quickstart.html#root-component) example.
32+
You saw a component for the first time in the [QuickStart](../quickstart.html) example.
3333

3434
*Structural Directives* change the structure of the view. Two examples are [NgFor](template-syntax.html#ngFor) and [NgIf](template-syntax.html#ngIf)
3535
in the [Template Syntax](template-syntax.html) page.

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ table(width="100%")
3535
td <b>Guide</b>
3636
td
3737
:marked
38-
Learn the Angular basics (you're already here!).
38+
Learn the Angular basics (you're already here!) like the setup for local development,
39+
displaying data and accepting user input, injecting application services into components,
40+
and building simple forms.
3941
tr(style=top)
4042
td <b><a href="../api/">API Reference</a></b>
4143
td
4244
:marked
43-
Authoritative details about each member of the Angular libraries.
45+
Authoritative details about each of the Angular libraries.
4446
tr(style=top)
4547
td <b><a href="../tutorial/">Tutorial</a></b>
4648
td

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

+12-3
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ block includes
22
include ../_util-fns
33

44
figure
5-
img(src="/resources/images/devguide/intro/people.png" alt="Us" align="left" style="width:200px; margin-left:-40px;margin-right:10px" )
5+
img(src="/resources/images/devguide/intro/people.png" width="200px" height="152px" alt="Us" align="left" style="margin-left:-40px;margin-right:10px" )
66
:marked
77
Everyone learns differently.
88
You don't have to read the documentation straight through. Most pages stand on their own.
99
Those new to Angular may wish to follow this popular learning path.
1010
<br class="l-clear-left">
1111

1212
:marked
13+
1. [Setup](setup.html "Setup locally withe Quickstart seed") for local Angular development, if you haven't already done so.
14+
1315
1. Take the [*Tour of Heroes* tutorial](../tutorial "Tour of Heroes").
1416

15-
The *Tour of Heroes* takes you step-by-step from the [QuickStart](../quickstart.html)
17+
The *Tour of Heroes* takes you step-by-step from [setup](setup.html)
1618
to a full-featured example that demonstrates the essential characteristics of a professional application:
1719
a sensible project structure, data binding, master/detail, services, dependency injection, navigation, and remote data access.
1820

19-
1. Read the [Architecture](architecture.html) overview for the big picture.
21+
1. <a id="architecture"></a>Read the [Architecture](architecture.html) overview for the big picture.
2022

2123
1. [The Root Module](appmodule.html) introduces the `NgModule` class that tells Angular how to compile and run your application.
2224

@@ -32,3 +34,10 @@ figure
3234
1. [Template Syntax](template-syntax.html) is a comprehensive study of Angular template HTML.
3335

3436
After reading the above sections, feel free to skip around among the other pages on this site.
37+
38+
.l-sub-section
39+
:marked
40+
### Next Step
41+
42+
Try the [tutorial](../tutorial "Tour of Heroes") if you're ready to start coding or
43+
visit the [Architecture](architecture.html "Basic Concepts") guide if you prefer to learn the basic concepts first.

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

+54-36
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
block includes
22
include ../_util-fns
33

4+
a#develop-locally
45
:marked
5-
## Trying Angular
6-
7-
Live coding [Quickstart](../quickstart.html) in the browser is a great way to explore Angular.
8-
Links on almost every documentation page will open completed samples in the browser where you can
9-
play with the code, share your changes with friends, and download and run the code on your own machine.
10-
11-
As much fun as this is ...
12-
* you can't ship your app in plunker
13-
* you aren't always online when writing code
14-
* transpiling TypeScript in the browser is slow
15-
* the type support, refactoring, and code completion only work in your local IDE
16-
176
## Setup a local development environment
7+
The <live-example name=quickstart>QuickStart live-coding</live-example> example is an Angular _playground_.
8+
It's not where you'd develop a real application.
9+
You [should develop locally](#why-locally "Why develop locally") on your own machine ... and that's also how we think you should learn Angular.
1810

19-
Fortunately, setting up a new project in your local development environment is quick and easy
20-
with the [**QuickStart seed**](https://github.com/angular/quickstart "Install the github QuickStart repo"),
21-
a repository on github.
11+
Setting up a new project on your machine is quick and easy with the **QuickStart seed**,
12+
maintained [on github](https://github.com/angular/quickstart "Install the github QuickStart repo").
2213

2314
Make sure you have [node and npm installed](#install-node "What if you don't have node?").
2415
Then ...
25-
1. [clone](#clone) or [download](#download) the **QuickStart seed repository**.
26-
1. [install the `npm` packages](#install-node "What if you don't have node?")
27-
1. run `npm start` to launch the sample application
16+
1. Create a project folder (you can call it <span ngio-ex>quickstart</span> and rename it later).
17+
1. [Clone](#clone "Clone it from github") or [download](#download "download it from github") the **QuickStart seed** into your project folder.
18+
1. [Install the _npm_ packages](#install-node "What if you don't have node?").
19+
1. Run `npm start` to launch the sample application.
2820

2921
a#clone
3022
:marked
@@ -33,8 +25,8 @@ a#clone
3325
Perform the _clone-to-launch_ steps with these terminal commands.
3426

3527
code-example(language="sh" class="code-shell").
36-
git clone https://github.com/angular/quickstart.git my-project
37-
cd my-project
28+
git clone https://github.com/angular/quickstart.git quickstart
29+
cd quickstart
3830
npm install
3931
npm start
4032

@@ -45,15 +37,15 @@ a#download
4537
and unzip it into your project folder. Then perform the remaining steps with these terminal commands.
4638

4739
code-example(language="sh" class="code-shell").
48-
cd my-project
40+
cd quickstart
4941
npm install
5042
npm start
5143

5244
.l-main-section
5345
:marked
54-
## What's different about the QuickStart seed?
46+
## What's in the QuickStart seed?
5547

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

@@ -76,12 +68,7 @@ code-example(language="sh" class="code-shell").
7668
app/main.ts
7769
`)(format='.')
7870
:marked
79-
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_
81-
so the reader can discover Angular without distraction.
82-
83-
All other guides and cookbooks expect you to have defined these three files explicitly.
84-
Each file has a distinct purpose and evolves independently as the application grows.
71+
All guides and cookbooks have _at least these three files_. Each file has a distinct purpose and evolves independently as the application grows.
8572

8673
style td, th {vertical-align: top}
8774
table(width="100%")
@@ -94,31 +81,34 @@ table(width="100%")
9481
td <code>app.component.ts</code>
9582
td
9683
:marked
97-
Defines the same `AppComponent` as the one in the [QuickStart](../quickstart.html).
84+
Defines the same `AppComponent` as the one in the [QuickStart](../quickstart.html) playground.
9885
It is the **root** component of what will become a tree of nested components
9986
as the application evolves.
10087
tr
10188
td <code>app.module.ts</code>
10289
td
10390
:marked
104-
Defines `AppModule`, the [root module](appmodule.html) that tells Angular how to assemble the application.
91+
Defines `AppModule`, the [root module](appmodule.html "AppModule: the root module") that tells Angular how to assemble the application.
10592
Right now it declares only the `AppComponent`.
10693
Soon there will be more components to declare.
10794
tr
10895
td <code>main.ts</code>
10996
td
11097
:marked
11198
Compiles the application with the [JiT compiler](../glossary.html#jit)
112-
and [bootstraps](appmodule.html#main) the application to run in the browser.
99+
and [bootstraps](appmodule.html#main "bootstrap the application") the application to run in the browser.
113100
That's a reasonable choice for the development of most projects and
114101
it's the only viable choice for a sample running in a _live-coding_ environment like Plunker.
115102
You'll learn about alternative compiling and deployment options later in the documentation.
116103

117-
.l-main-section
118-
:marked
119-
## Next Step
104+
.l-sub-section
105+
:marked
106+
### Next Step
107+
108+
If you're new to Angular, we recommend staying on the [learning path](learning-angular.html).
120109

121-
If you're new to Angular, try the recommended [learning path](learning-path.html).
110+
br
111+
br
122112

123113
a#install-node
124114
.l-main-section
@@ -140,3 +130,31 @@ a#install-node
140130
You may need [nvm](https://github.com/creationix/nvm) if you already have projects running on your machine that
141131
use other versions of node and npm.
142132

133+
a#why-locally
134+
.l-main-section
135+
:marked
136+
## Appdendix: Why develop locally
137+
138+
<live-example>Live coding</live-example> in the browser is a great way to explore Angular.
139+
140+
Links on almost every documentation page open completed samples in the browser.
141+
You can play with the sample code, share your changes with friends, and download and run the code on your own machine.
142+
143+
The [QuickStart](../quickstart.html "Angular QuickStart Playground") shows just the `AppComponent` file.
144+
It creates the equivalent of `app.module.ts` and `main.ts` internally _for the playground only_.
145+
so the reader can discover Angular without distraction.
146+
The other samples are based on the QuickStart seed.
147+
148+
As much fun as this is ...
149+
* you can't ship your app in plunker
150+
* you aren't always online when writing code
151+
* transpiling TypeScript in the browser is slow
152+
* the type support, refactoring, and code completion only work in your local IDE
153+
154+
Use the <live-example><i>live coding</i></live-example> environment as a _playground_,
155+
a place to try the documentation samples and experiment on your own.
156+
It's the perfect place to reproduce a bug when you want to
157+
<a href="https://github.com/angular/angular.io/issues/new" target="_blank" title="File a documentation issue">file a documentation issue</a> or
158+
<a href="https://github.com/angular/angular/issues/new" target="_blank" title="File an Angular issue">file an issue with Angular itself</a>.
159+
160+
For real development, we strongly recommend [developing locally](#develop-locally).

public/docs/ts/latest/quickstart.jade

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
include _util-fns
22

33
:marked
4-
The easiest way to get started with Angular is to **<live-example>try the <i>Hello Angular</i> live example</live-example>**.
4+
The **QuickStart playground** is the easiest way to discover Angular.
55
You don't need to install anything.
6-
Just open it and follow along with the documentation.
7-
If you'd rather develop in a local environment, learn how on the [Setup](guide/setup.html) page.
6+
Just click the image below, launch the live-coding environment, and start entering code.
87

9-
Angular applications are made of _components_.
10-
A _component_ is the combination of an HTML template and a component class that controls a portion of the screen.
11-
Here's a super-simple Angular component, written in [TypeScript](#typescript):
8+
<live-example embedded img="devguide/quickstart/quickstart-plnkr.png"><live-example>
9+
10+
The QuickStart displays a super-simple Angular component, written in [TypeScript](#typescript):
1211

1312
+makeExample('app/app.component.ts','','app/app.component.ts')(format='.')
1413
:marked
15-
The `@Component` [_decorator_](glossary.html#decorator '"Decorator" explained') function takes a _metadata_ object that
16-
describes how the HTML template and component class work together.
14+
Angular applications are made of _components_.
15+
A _component_ is the combination of an HTML template and a component class that controls a portion of the screen.
16+
17+
Every component begins with a `@Component` [_decorator_](glossary.html#decorator '"Decorator" explained') function
18+
that takes a _metadata_ object. The metadata describe how the HTML template and component class work together.
1719

1820
The `selector` property tells Angular to display the component inside a custom `<my-app>` tag in the `index.html`.
1921
+makeExample('index.html','my-app','index.html (inside <body>)')(format='.')
@@ -30,7 +32,12 @@ include _util-fns
3032
.l-sub-section
3133
:marked
3234
### Next step
33-
Start [learning Angular](guide/learning-angular.html).
35+
36+
This QuickStart playground is fine for exploring Angular
37+
but you won't develop a real application there.
38+
39+
You'll want to develop locally on your own machine.
40+
Visit the [**setup guide**](guide/setup.html "Install Angular for local development") to learn how.
3441

3542
.l-main-section
3643
a#typescript
@@ -41,8 +48,9 @@ a#typescript
4148
TypeScript compiles into JavaScript that runs on any modern browser.
4249
Most developers find it delightful which is why most Angular developers write applications in TypeScript.
4350
You can write your application in
44-
[other versions of JavaScript](cookbook/ts-to-js.html "TypeScript to JavaScript") or
45-
[Dart](../../dart/latest) if you prefer.
46-
// will be
51+
[other versions of JavaScript](cookbook/ts-to-js.html "TypeScript to JavaScript")
52+
if you prefer.
53+
//
54+
[Dart](../../dart/latest)
4755
<a href="https://github.com/angular/dart/latest" target="_blank" title="Dart">Dart</a> if you prefer.
4856

public/docs/ts/latest/tutorial/_data.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"index": {
33
"title": "Tutorial: Tour of Heroes",
44
"navTitle": "Introduction",
5-
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript.",
5+
"intro": "The Tour of Heroes tutorial takes you through the steps of creating an Angular application in TypeScript.",
66
"nextable": true
77
},
88
"toh-pt1": {

0 commit comments

Comments
 (0)