blob: 701f41d38cb1be669a397727db3bcd5e44ee3b67 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
  };
}]);
 |