aboutsummaryrefslogtreecommitdiffstats
path: root/docs/app/src/versions.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/app/src/versions.js')
-rw-r--r--docs/app/src/versions.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/app/src/versions.js b/docs/app/src/versions.js
new file mode 100644
index 00000000..701f41d3
--- /dev/null
+++ b/docs/app/src/versions.js
@@ -0,0 +1,15 @@
+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;
+ };
+}]); \ No newline at end of file