Skip to content
This repository was 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
Merged
Changes from all commits
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
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) {
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)

return {
active: navItem.href && this.currentPage && this.currentPage.path,
Expand Down Expand Up @@ -53,8 +51,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;
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.

$scope.loading = 0;


Expand Down