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

Commit 6234cda

Browse files
committed
docs(tutorial): add deprecation notice to v1.4.x tutorial and point to the correct branch
- Add a deprecation notice on the 'index' page. - Hide the "Live Demo" buttons (since we don't have a live demo). - Update the GitHub diff links to point to the `1.4-snapshot` angular-phonecat branch. - Modify all git commangs to use the appropriate branch and tags (e.g. `1.4-step-*`). Related to #14416. Closes #14675
1 parent f8103a8 commit 6234cda

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

docs/app/src/tutorials.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ angular.module('tutorials', [])
1111
scope: {},
1212
template:
1313
'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n' +
14-
'<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' +
15-
'<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' +
14+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/1.4-step-{{diffLo}}...1.4-step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
1615
'<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',
1716
link: function(scope, element, attrs) {
1817
var seq = 1 * attrs.docTutorialNav;
@@ -38,12 +37,11 @@ angular.module('tutorials', [])
3837
'<p><button class="btn" ng-click="show=!show">Workspace Reset Instructions ➤</button></p>\n' +
3938
'<div class="alert alert-info" ng-show="show">\n' +
4039
' <p>Reset the workspace to step {{step}}.</p>' +
41-
' <p><pre>git checkout -f step-{{step}}</pre></p>\n' +
42-
' <p>Refresh your browser or check out this step online: '+
43-
'<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
40+
' <p><pre>git checkout -f 1.4-step-{{step}}</pre></p>\n' +
41+
' <p>Refresh your browser to see the changes.</p>\n' +
4442
'</div>\n' +
4543
'<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' +
44+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/1.4-step-{{step ? (step - 1) : \'0~1\'}}...1.4-step-{{step}}" title="See diff on Github">GitHub</a>\n' +
4745
'</p>'
4846
};
49-
});
47+
});

docs/content/tutorial/index.ngdoc

+22-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55

66
# PhoneCat Tutorial App
77

8+
<div class="alert alert-danger">
9+
<p>
10+
This version of the tutorial is deprecated and no longer maintained. You can find the most
11+
recent version of the tutorial at https://docs.angularjs.org/tutorial/.
12+
</p>
13+
<p>
14+
It is recommended to use the latest tutorial version for the following reasons:
15+
<ul>
16+
<li>It showcases features introduced in AngularJS v1.5+</li>
17+
<li>It follows modern best practices in terms of architecture and code organization</li>
18+
<li>It has more up-to-date dependencies and tools</li>
19+
<li>It is actively maintained</li>
20+
</ul>
21+
</p>
22+
</div>
23+
824
A great way to get introduced to AngularJS is to work through this tutorial, which walks you through
925
the construction of an AngularJS web app. The app you will build is a catalog that displays a list
1026
of Android devices, lets you filter the list to see only devices that interest you, and then view
@@ -73,7 +89,7 @@ Clone the [angular-phonecat repository][angular-phonecat] located at GitHub by r
7389
command:
7490

7591
```
76-
git clone --depth=14 https://github.com/angular/angular-phonecat.git
92+
git clone --depth=14 --branch=1.4-snapshot https://github.com/angular/angular-phonecat.git
7793
```
7894

7995
This command creates the `angular-phonecat` directory in your current directory.
@@ -82,6 +98,11 @@ This command creates the `angular-phonecat` directory in your current directory.
8298
download much smaller and faster.
8399
</div>
84100

101+
<div class="alert alert-info">
102+
The `--branch=1.4-snapshot` option tells Git to pull down the `1.4-snapshot` branch.
103+
The code for this older version of the tutorial is on that branch.
104+
</div>
105+
85106
Change your current directory to `angular-phonecat`.
86107

87108
```

docs/content/tutorial/step_00.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies, as described in {@link index#get-started Get Started}.
1616
In the `angular-phonecat` directory, run this command:
1717

1818
```
19-
git checkout -f step-0
19+
git checkout -f 1.4-step-0
2020
```
2121

2222

0 commit comments

Comments
 (0)