Skip to content

Commit 433c871

Browse files
authored
fix(docsApp): show correct version number in api index
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
1 parent 01d8638 commit 433c871

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/app/src/docs.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ angular.module('DocsController', [])
88
function($scope, $rootScope, $location, $window, $cookies,
99
NG_PAGES, NG_NAVIGATION, NG_VERSION) {
1010

11-
$scope.docsVersion = NG_VERSION.isSnapshot ? 'snapshot' : NG_VERSION.version;
12-
1311
$scope.navClass = function(navItem) {
1412
return {
1513
active: navItem.href && this.currentPage && this.currentPage.path,
@@ -60,8 +58,8 @@ angular.module('DocsController', [])
6058
Initialize
6159
***********************************/
6260

63-
$scope.versionNumber = angular.version.full;
64-
$scope.version = angular.version.full + ' ' + angular.version.codeName;
61+
$scope.versionNumber = NG_VERSION.full;
62+
$scope.version = NG_VERSION.full + ' ' + NG_VERSION.codeName;
6563
$scope.loading = 0;
6664

6765

0 commit comments

Comments
 (0)