Skip to content

Commit

Permalink
fix(docsApp): show correct version number in api index
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Narretz authored and petebacondarwin committed Nov 21, 2016
1 parent 7b9457f commit 6005aa1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/app/src/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

$scope.navClass = function(navItem) {
return {
active: navItem.href && this.currentPage && this.currentPage.path,
Expand Down Expand Up @@ -60,8 +58,8 @@ angular.module('DocsController', [])
Initialize
***********************************/

$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;
$scope.loading = 0;


Expand Down

0 comments on commit 6005aa1

Please sign in to comment.