Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit eab89d4

Browse files
committed
fixup 2
- Fix typos. - Fix navigation for steps > 12. - Make section title consistent (include "Component" where appropriate). - Improve alert formatting (titles, line spacing).
1 parent 0002c05 commit eab89d4

15 files changed

+56
-29
lines changed

docs/app/src/tutorials.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ angular.module('tutorials', [])
55
'',
66
'step_00', 'step_01', 'step_02', 'step_03', 'step_04',
77
'step_05', 'step_06', 'step_07', 'step_08', 'step_09',
8-
'step_10', 'step_11', 'step_12', 'the_end'
8+
'step_10', 'step_11', 'step_12', 'step_13', 'step_14',
9+
'the_end'
910
];
1011
return {
1112
scope: {},
@@ -43,7 +44,7 @@ angular.module('tutorials', [])
4344
'<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
4445
'</div>\n' +
4546
'<p>The most important changes are listed below. You can see the full diff on ' +
46-
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}" title="See diff on Github">GitHub</a>\n' +
47+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}" title="See diff on Github">GitHub</a>.\n' +
4748
'</p>'
4849
};
49-
});
50+
});

docs/config/templates/indexPage.template.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ <h4 class="search-results-group-heading">{{ key }}</h4>
228228
)
229229
</p>
230230
<p>
231-
Code licensed under the
232-
<a href="https://github.com/angular/angular.js/blob/master/LICENSE" target="_blank">The
233-
MIT License</a>. Documentation licensed under <a
234-
href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.
231+
Code licensed under
232+
<a href="https://github.com/angular/angular.js/blob/master/LICENSE" target="_blank">The MIT License</a>.
233+
Documentation licensed under
234+
<a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.
235235
</p>
236236
</div>
237237
</footer>

docs/content/tutorial/index.ngdoc

+19-4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The tutorial instructions, from now on, assume you are running all commands from
9797
`angular-phonecat` directory.
9898

9999
<div class="alert alert-warning">
100+
<p>**Firewall/Proxy Issues?**</p>
100101
<p>
101102
`git` and other tools (for example `bower` - see below), often use the `git:` protocol for
102103
accessing files in remote repositories. Some firewall configurations are blocking `git://` URLs,
@@ -266,11 +267,25 @@ npm run update-webdriver
266267
</div>
267268

268269
<div class="alert alert-warning">
269-
Under the hood, Protractor uses the [Selenium Stadalone Server][selenium], which in turn requires
270-
the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this
271-
by running `java -version` from the command line.
270+
<p>
271+
Running `update-webdriver` for the first time may take from several seconds up to a few minutes
272+
(depending on your hardware and network connection). If you cancel the operation (e.g. using
273+
`Ctrl+C`), you might get errors, when trying to run Protractor later.
274+
</p>
275+
<p>
276+
In that case, you can delete the `node_modules/` directory and run `npm install` again.
277+
</p>
278+
</div>
272279

273-
If JDK is not already installed, you can download it [here][jdk-download].
280+
<div class="alert alert-warning">
281+
<p>
282+
Under the hood, Protractor uses the [Selenium Stadalone Server][selenium], which in turn
283+
requires the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this
284+
by running `java -version` from the command line.
285+
</p>
286+
<p>
287+
If JDK is not already installed, you can download it [here][jdk-download].
288+
</p>
274289
</div>
275290

276291
Since Protractor works by interacting with a running application, we need to start our web server:

docs/content/tutorial/step_00.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ For more info on `ngApp`, check out the {@link ngApp API Reference}.
8585
**`angular.js` script tag:**
8686

8787
```html
88-
<script src="bower_components/angular/angular.js">
88+
<script src="bower_components/angular/angular.js"></script>
8989
```
9090

9191
This code downloads the `angular.js` script which registers a callback that will be executed by the

docs/content/tutorial/step_02.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe('PhoneListController', function() {
206206
* With this instance, we verify that the phones array property on the scope contains three records.
207207

208208
<div class="alert alert-info">
209-
**A note on file naming:**
209+
<p>**A note on file naming:**</p>
210210
<p>
211211
As already mentioned in the [introduction](tutorial/#running-unit-tests), the unit test files
212212
(specs) are kept side-by-side with the application code. We name our specs after the file

docs/content/tutorial/step_03.ngdoc

+6-5
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,12 @@ Voilà! The resulting output should look the same, but let's see what we have ga
187187
<img class="diagram" src="img/tutorial/tutorial_03.png">
188188

189189
<div class="alert alert-info">
190-
**A note on file naming:**
191-
<br />
192-
It is a good practice to distinguish different types of entities by suffix. In this tutorial, we
193-
are using the `.component` suffix for components, so the definition of a `someComponent` component
194-
would be in a file named `some-component.component.js`.
190+
<p>**A note on file naming:**</p>
191+
<p>
192+
It is a good practice to distinguish different types of entities by suffix. In this tutorial, we
193+
are using the `.component` suffix for components, so the definition of a `someComponent`
194+
component would be in a file named `some-component.component.js`.
195+
</p>
195196
</div>
196197

197198

docs/content/tutorial/step_05.ngdoc

+6
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ To rerun the test suite, execute `npm run protractor` again.
141141
the web server.
142142
</div>
143143

144+
<div class="alert alert-warning">
145+
The web server is configured to use port 8000. If the port is already in use (for example by
146+
another instance of a running web server) you will get an `EADDRINUSE` error. Make sure the port
147+
is available before running `npm start`.
148+
</div>
149+
144150

145151
# Experiments
146152

docs/content/tutorial/step_06.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the repeater, and letting the data binding magic do the rest of the work.
1717
<div doc-tutorial-reset="6"></div>
1818

1919

20-
## Template
20+
## Component Template
2121

2222
<br />
2323
**`app/phone-list/phone-list.template.html`:**
@@ -77,7 +77,7 @@ menu), Angular's data-binding will cause the view to automatically update. No bl
7777
manipulation code is necessary!
7878

7979

80-
## Controller
80+
## Component Controller
8181

8282
<br />
8383
**`app/phone-list/phone-list.components.js`:**

docs/content/tutorial/step_07.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Following is a sample of the file:
3838
```
3939

4040

41-
## Controller
41+
## Component Controller
4242

4343
We will use Angular's {@link ng.$http $http} service in our controller for making an HTTP request to
4444
our web server to fetch the data in the `app/phones/phones.json` file. `$http` is just one of
@@ -55,7 +55,7 @@ themselves, but by the DI subsystem). As a result, applications are easier to te
5555

5656
```js
5757
angular.
58-
module('phoneList).
58+
module('phoneList').
5959
component('phoneList', {
6060
templateUrl: 'phone-list/phone-list.template.html',
6161
controller: function PhoneListController($http) {

docs/content/tutorial/step_08.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ URLs point to the `app/img/phones/` directory.
3838
```
3939

4040

41-
## Template
41+
## Component Template
4242

4343
<br />
4444
**`app/phone-list/phone-list.template.html`:**

docs/content/tutorial/step_09.ngdoc

+4
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@ various URLs and verifying that the correct view was rendered.
358358
browser.get('index.html#/phones');
359359
});
360360

361+
...
362+
363+
});
364+
361365
...
362366

363367
describe('View: Phone details', function() {

docs/content/tutorial/step_10.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Each of these files describes various properties of the phone using the same dat
5252
show this data in the phone details view.
5353

5454

55-
## Controller
55+
## Component Controller
5656

5757
We will expand the `phoneDetail` component's controller by using the `$http` service to fetch the
5858
appropriate JSON files. This works the same way as the `phoneList` component's controller.
@@ -81,7 +81,7 @@ To construct the URL for the HTTP request, we use `$routeParams.phoneId`, which
8181
the current route by the `$route` service.
8282

8383

84-
## Template
84+
## Component Template
8585

8686
The inline, TBD placeholder template has been replaced with a full blown external template,
8787
including lists and bindings that comprise the phone details. Note how we use the Angular

docs/content/tutorial/step_11.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ angular.module('phonecatApp', [
6666
```
6767

6868

69-
## Template
69+
## Templates
7070

7171
Since we have created two new files (**core.module.js**, **checkmark.filter.js**), we need to
7272
include them in our layout template.

docs/content/tutorial/step_12.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In this step, you will add a clickable phone image swapper to the phone details
1616
<div doc-tutorial-reset="12"></div>
1717

1818

19-
## Controller
19+
## Component Controller
2020

2121
<br />
2222
**`app/phone-detail/phone-detail.component.js`:**
@@ -47,7 +47,7 @@ We also created a `setImage()` method (to be used as event handler), that will c
4747
`mainImageUrl`.
4848

4949

50-
## Template
50+
## Component Template
5151

5252
<br />
5353
**`app/phone-detail/phone-detail.template.html`:**

docs/content/tutorial/step_13.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ need to load the `angular-resource.js` file, which contains the `ngResource` mod
138138
```
139139

140140

141-
## Controller
141+
## Component Controllers
142142

143143
We can now simplify our component controllers (`PhoneListController` and `PhoneDetailController`) by
144144
factoring out the lower-level `$http` service, replacing it with the new `Phone` service. Angular's

0 commit comments

Comments
 (0)