fix(frontend): fixed changing location

before we were setting the location on the window when we should have been just using Angular $location service instead

[TESTING -> tested locally with docker compose and a complete build]

- [ ] It works!
- [ ] Comments provide sufficient explanations for the next contributor
- [ ] Tests cover changes and corner cases
- [ ] Follows Quay syntax patterns and format
This commit is contained in:
Charlton Austin 2017-05-05 15:10:06 -04:00
parent a6b7560fdc
commit 6e533e3627
4 changed files with 12 additions and 10 deletions

View file

@ -38,7 +38,8 @@ angular.module('quay').directive('signupForm', function () {
$scope.userRegistered({'username': $scope.newUser.username});
if (!$scope.awaitingConfirmation && !$scope.inviteCode) {
document.location = '/';
$location.path("/");
}
UserService.load();

View file

@ -12,7 +12,7 @@ angular.module('quay').directive('teamsManager', function () {
'organization': '=organization',
'isEnabled': '=isEnabled'
},
controller: function($scope, $element, ApiService, $timeout, UserService, TableService, UIService, Config, Features) {
controller: function($scope, $element, ApiService, $timeout, UserService, TableService, UIService, Config, Features, $location) {
$scope.TableService = TableService;
$scope.Config = Config;
$scope.Features = Features;
@ -151,7 +151,7 @@ angular.module('quay').directive('teamsManager', function () {
};
$scope.viewTeam = function(teamName) {
document.location = '/organization/' + $scope.organization.name + '/teams/' + teamName;
$location.path('/organization/' + $scope.organization.name + '/teams/' + teamName);
};
$scope.showMembers = function(value) {