mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-06-13 00:28:10 +08:00
15 lines
502 B
JavaScript
15 lines
502 B
JavaScript
angular.module('versions', [])
|
|
|
|
.controller('DocsVersionsCtrl', ['$scope', '$location', '$window', 'NG_VERSIONS', function($scope, $location, $window, NG_VERSIONS) {
|
|
$scope.docs_versions = NG_VERSIONS;
|
|
$scope.docs_version = NG_VERSIONS[0];
|
|
|
|
$scope.jumpToDocsVersion = function(version) {
|
|
var currentPagePath = $location.path();
|
|
|
|
// TODO: We need to do some munging of the path for different versions of the API...
|
|
|
|
|
|
$window.location = version.docsUrl + currentPagePath;
|
|
};
|
|
}]); |