diff --git a/static/js/controllers.js b/static/js/controllers.js index 64042558c..334311918 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -204,7 +204,7 @@ function RepoListCtrl($scope, Restangular, UserService) { }); } -function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) { +function LandingCtrl($scope, $timeout, $location, Restangular, UserService, KeyService) { $('.form-signup').popover(); $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { @@ -230,7 +230,11 @@ function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) { }; $scope.browseRepos = function() { - document.location = '/repository/'; + $location.path('/repository/'); + }; + + $scope.createRepo = function() { + $location.path('/new/'); }; $scope.register = function() { @@ -906,13 +910,13 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, Restangular) { }); } -function V1Ctrl($scope, UserService) { +function V1Ctrl($scope, $location, UserService) { $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { $scope.user = currentUser; }, true); $scope.browseRepos = function() { - document.location = '/repository/'; + $location.path('/repository/'); }; } diff --git a/static/partials/landing.html b/static/partials/landing.html index f425552e5..b53b4504f 100644 --- a/static/partials/landing.html +++ b/static/partials/landing.html @@ -61,7 +61,8 @@