docs(versions): remove the trailing slash in URLs when switch versions

Because `https://docs.angularjs.org/api/` can handler the trailing slash,
but `https://code.angularjs.org/1.2.24/docs/api` can not.

Fix #9043
Closes #9045
This commit is contained in:
bolasblack
2014-09-12 16:41:36 +08:00
committed by Igor Minar
parent 58e8c02c14
commit aa1c23a2bf

View File

@@ -19,7 +19,7 @@ angular.module('versions', [])
};
$scope.jumpToDocsVersion = function(version) {
var currentPagePath = $location.path();
var currentPagePath = $location.path().replace(/\/$/, '');
// TODO: We need to do some munging of the path for different versions of the API...