-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix(docsApp): show correct version number in api index #15265
Conversation
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
OK, let's go with this. |
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
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
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
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
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
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
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
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
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
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
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, buthas not been used since bdec35c.