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

docs(tutorial): add deprecation notice to v1.4.x tutorial and point to the correct branch #14675

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions docs/app/src/tutorials.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ angular.module('tutorials', [])
scope: {},
template:
'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n' +
'<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' +
'<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' +
// '<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' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving this commented for the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For historical reasons 😛 I will remove it.
Are we OK with not having a live demo for the old tutorial ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

'<a ng-href="https://github.com/angular/angular-phonecat/compare/pre-v1.5.0-snapshot~{{diffLo}}...pre-v1.5.0-snapshot~{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
'<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',
link: function(scope, element, attrs) {
var seq = 1 * attrs.docTutorialNav;
scope.seq = seq;
scope.prev = pages[seq];
scope.next = pages[2 + seq];
scope.diffLo = seq ? (seq - 1): '0~1';
scope.diffHi = seq;
scope.diffLo = 13 - seq;
scope.diffHi = 12 - seq;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm...I made them before I created the new tags. Now that we have the tags, I should just change compare/step- to compare/old-step- 😃


element.addClass('btn-group');
element.addClass('tutorial-nav');
Expand All @@ -38,12 +38,13 @@ angular.module('tutorials', [])
'<p><button class="btn" ng-click="show=!show">Workspace Reset Instructions ➤</button></p>\n' +
'<div class="alert alert-info" ng-show="show">\n' +
' <p>Reset the workspace to step {{step}}.</p>' +
' <p><pre>git checkout -f step-{{step}}</pre></p>\n' +
' <p>Refresh your browser or check out this step online: '+
'<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
' <p><pre>git checkout -f old-step-{{step}}</pre></p>\n' +
// ' <p>Refresh your browser or check out this step online: '+
// '<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
' <p>Refresh your browser to see the changes.</p>\n' +
'</div>\n' +
'<p>The most important changes are listed below. You can see the full diff on ' +
'<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' +
'<a ng-href="https://github.com/angular/angular-phonecat/compare/pre-v1.5.0-snapshot~{{13 - step}}...pre-v1.5.0-snapshot~{{12 - step}}" title="See diff on Github">GitHub</a>.\n' +
'</p>'
};
});
});
23 changes: 22 additions & 1 deletion docs/content/tutorial/index.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@

# PhoneCat Tutorial App

<div class="alert alert-danger">
<p>
This version of the tutorial is deprecated and no longer maintained. You can find the most
recent version of the tutorial at https://docs.angularjs.org/tutorial/.
</p>
<p>
It is recommended to use the latest tutorial version for the following reasons:
<ul>
<li>It showcases features introduced in AngularJS v1.5+</li>
<li>It follows modern best practices in terms of architecture and code organization</li>
<li>It has more up-to-date dependencies and tools</li>
<li>It is actively maintained</li>
</ul>
</p>
</div>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

A great way to get introduced to AngularJS is to work through this tutorial, which walks you through
the construction of an AngularJS web app. The app you will build is a catalog that displays a list
of Android devices, lets you filter the list to see only devices that interest you, and then view
Expand Down Expand Up @@ -73,7 +89,7 @@ Clone the [angular-phonecat repository][angular-phonecat] located at GitHub by r
command:

```
git clone --depth=14 https://github.com/angular/angular-phonecat.git
git clone --depth=14 --branch=pre-v1.5.0-snapshot https://github.com/angular/angular-phonecat.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

```

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

<div class="alert alert-info">
The `--branch=pre-v1.5.0-snapshot` option tells Git to pull down the `pre-v1.5.0-snapshot` branch.
The code for this older version of the tutorial is on that branch.
</div>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

Change your current directory to `angular-phonecat`.

```
Expand Down
2 changes: 1 addition & 1 deletion docs/content/tutorial/step_00.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies, as described in {@link index#get-started Get Started}.
In the `angular-phonecat` directory, run this command:

```
git checkout -f step-0
git checkout -f old-step-0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

```


Expand Down