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

Commit fd0939c

Browse files
committed
docs(tutorial): use the angular/angular-phonecat#1.5-snapshot branch
Similar to what was done in 6234cda for the `v1.4.x` branch. The tutorial will slightly change for v1.7.x (see angular/angular-phonecat#430 for details), so this commit ensures the tutorial for older versions (v1.5.x, v1.6.x) remains usable.
1 parent 8ecbb53 commit fd0939c

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

docs/app/src/tutorials.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ angular.module('tutorials', [])
1414
scope: {},
1515
template:
1616
'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n' +
17-
'<a ng-href="http://angular.github.io/angular-phonecat/step-{{seq}}/app"><li class="btn btn-primary"><i class="glyphicon glyphicon-play"></i> Live Demo</li></a>\n' +
18-
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{diffLo}}...step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
17+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/1.5-step-{{diffLo}}...1.5-step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
1918
'<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',
2019
link: function(scope, element, attrs) {
2120
var seq = 1 * attrs.docTutorialNav;
@@ -41,12 +40,11 @@ angular.module('tutorials', [])
4140
'<p><button class="btn" ng-click="show=!show">Workspace Reset Instructions ➤</button></p>\n' +
4241
'<div class="alert alert-info" ng-show="show">\n' +
4342
' <p>Reset the workspace to step {{step}}.</p>' +
44-
' <p><pre>git checkout -f step-{{step}}</pre></p>\n' +
45-
' <p>Refresh your browser or check out this step online: ' +
46-
'<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
43+
' <p><pre>git checkout -f 1.5-step-{{step}}</pre></p>\n' +
44+
' <p>Refresh your browser to see the changes.</p>\n' +
4745
'</div>\n' +
4846
'<p>The most important changes are listed below. You can see the full diff on ' +
49-
'<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/1.5-step-{{step ? (step - 1): \'0~1\'}}...1.5-step-{{step}}" title="See diff on Github">GitHub</a>.\n' +
5048
'</p>'
5149
};
5250
});

docs/content/tutorial/index.ngdoc

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Clone the [angular-phonecat repository][angular-phonecat] located at GitHub by r
7777
command:
7878

7979
```
80-
git clone --depth=16 https://github.com/angular/angular-phonecat.git
80+
git clone --depth=16 --branch=1.5-snapshot https://github.com/angular/angular-phonecat.git
8181
```
8282

8383
This command creates an `angular-phonecat` sub-directory in your current directory.
@@ -87,6 +87,11 @@ This command creates an `angular-phonecat` sub-directory in your current directo
8787
This makes the download much smaller and faster.
8888
</div>
8989

90+
<div class="alert alert-info">
91+
The `--branch=1.5-snapshot` option tells Git to pull down the `1.5-snapshot` branch.
92+
The code for this older version of the tutorial is on that branch.
93+
</div>
94+
9095
Change your current directory to `angular-phonecat`.
9196

9297
```
@@ -199,7 +204,7 @@ You can now browse to the application at http://localhost:8000/index.html.
199204

200205
<div class="alert alert-info">
201206
To serve the web app on a different IP address or port, edit the "start" script within
202-
`package.json`. You can use `-a` to set the address and `-p` to set the port. You also need to
207+
`package.json`. You can use `-a` to set the address and `-p` to set the port. You also need to
203208
update the `baseUrl` configuration property in `e2e-test/protractor.conf.js`.
204209
</div>
205210

@@ -284,9 +289,9 @@ a new commit of changes to a remote repository.
284289
<br />
285290
**Firewall / Proxy issues**
286291

287-
Git and other tools, often use the `git:` protocol for accessing files in remote repositories.
288-
Some firewall configurations are blocking `git://` URLs, which leads to errors when trying to clone
289-
repositories or download dependencies. (For example corporate firewalls are "notorious" for blocking
292+
Git and other tools, often use the `git:` protocol for accessing files in remote repositories.
293+
Some firewall configurations are blocking `git://` URLs, which leads to errors when trying to clone
294+
repositories or download dependencies. (For example corporate firewalls are "notorious" for blocking
290295
`git:`.)
291296

292297
If you run into this issue, you can force the use of `https:` instead, by running the following
@@ -304,17 +309,17 @@ In that case, you can delete the `node_modules/` directory and run `npm install`
304309
<br />
305310
**Protractor dependencies**
306311

307-
Under the hood, Protractor uses the [Selenium Standalone Server][selenium], which in turn requires
308-
the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this by running
312+
Under the hood, Protractor uses the [Selenium Standalone Server][selenium], which in turn requires
313+
the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this by running
309314
`java -version` from the command line.
310315

311316
If JDK is not already installed, you can download it [here][jdk-download].
312317

313318
<br />
314319
**Error running the web server**
315320

316-
The web server is configured to use port 8000. If the port is already in use (for example by another
317-
instance of a running web server) you will get an `EADDRINUSE` error. Make sure the port is
321+
The web server is configured to use port 8000. If the port is already in use (for example by another
322+
instance of a running web server) you will get an `EADDRINUSE` error. Make sure the port is
318323
available, before running `npm start`.
319324

320325
<hr />

docs/content/tutorial/step_00.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ section.
1717
In the `angular-phonecat` directory, run this command:
1818

1919
```
20-
git checkout -f step-0
20+
git checkout -f 1.5-step-0
2121
```
2222

2323
This resets your workspace to step 0 of the tutorial app.

0 commit comments

Comments
 (0)