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

fix(docsApp): show correct version number in api index #15265

Merged
merged 1 commit into from
Nov 2, 2016

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Oct 14, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
fix in the docs app

What is the current behavior? (You can also link to an open issue here)
On https://docs.angularjs.org/api, the text currently says

These pages contain the AngularJS reference materials for version 1.5.8 arbitrary-fallbacks.

but the default docs are for the master / snapshot version.

Please check if the PR fulfills these requirements

Other information:

Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The $scope.docsVersion value was used in the plnkr opening code, but
has not been used since bdec35c.

Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.
@@ -8,8 +8,6 @@ angular.module('DocsController', [])
function($scope, $rootScope, $location, $window, $cookies,
NG_PAGES, NG_NAVIGATION, NG_VERSION) {

$scope.docsVersion = NG_VERSION.isSnapshot ? 'snapshot' : NG_VERSION.version;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that you removed this because it is not actually used anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is correct. (this is docsVersion, below is just version)

$scope.versionNumber = angular.version.full;
$scope.version = angular.version.full + ' ' + angular.version.codeName;
$scope.versionNumber = NG_VERSION.full;
$scope.version = NG_VERSION.full + ' ' + NG_VERSION.codeName;
Copy link
Contributor

Choose a reason for hiding this comment

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

In the master build, I don't think that there is a codeName etc...
Don't we need to do some logic similar to what was removed in line 11 above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The codename for the snapshot is actually "snapshot", at least when built locally.

@gkalpak gkalpak modified the milestones: Backlog2, Backlog Oct 18, 2016
@petebacondarwin
Copy link
Contributor

OK, let's go with this.

@Narretz Narretz merged commit 433c871 into angular:master Nov 2, 2016
@Narretz Narretz deleted the chore-docsapp-version branch November 2, 2016 12:22
Narretz added a commit that referenced this pull request Nov 4, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since bdec35c.

Closes #15265
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.

Closes angular#15265
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.

Closes angular#15265
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.

Closes angular#15265
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.

Closes angular#15265
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.

Closes angular#15265
petebacondarwin pushed a commit that referenced this pull request Nov 23, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since bdec35c.

Closes #15265
petebacondarwin pushed a commit that referenced this pull request Nov 24, 2016
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since bdec35c.

Closes #15265
ellimist pushed a commit to ellimist/angular.js that referenced this pull request Mar 15, 2017
Previously, the index would show the version of Angular that runs on
the page, not the version for which the docs are. This meant that in
that snapshot docs the stable version was displayed.

The `$scope.docsVersion` value was used in the plnkr opening code, but
has not been used since angular@bdec35c.

Closes angular#15265
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants