chore(ngdocs): fixup the docs version switcher

This commit is contained in:
Igor Minar
2013-08-13 16:57:52 -07:00
parent 90979061e8
commit 7215afa21c
3 changed files with 7 additions and 9 deletions

View File

@@ -4,9 +4,9 @@ var docsApp = {
serviceFactory: {}
};
docsApp.controller.DocsVersionsCtrl = ['$scope', '$window', 'NG_VERSIONS', function($scope, $window, NG_VERSIONS) {
docsApp.controller.DocsVersionsCtrl = ['$scope', '$window', 'NG_VERSIONS', 'NG_VERSION', function($scope, $window, NG_VERSIONS, NG_VERSION) {
$scope.versions = expandVersions(NG_VERSIONS);
$scope.version = ($scope.version || angular.version.full).match(/^([\d\.]+\d+)/)[1]; //match only the number
$scope.version = ($scope.version || NG_VERSION).match(/^([\d\.]+\d+\S+)/)[1]; //match only the number
$scope.jumpToDocsVersion = function(value) {
var isLastStable,