Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

AS#149005557179700, Add register route in topcoder-app #855

Merged
merged 1 commit into from
Jun 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions app/account/account.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import angular from 'angular'
}
},
'login': {
parent: 'auth',
url: '/login/?next&code&state&status&userJWTToken&utm_source&utm_medium&utm_campaign',
views: {
'header@': {},
Expand All @@ -36,8 +37,38 @@ import angular from 'angular'
}
]

},
'register': {
url: '/register/?next&utm_source&utm_medium&utm_campaign',
parent: 'auth',
views: {
'header@': {},
'container@': {},
'footer@': {}
},
data: {
title: 'Join',
authRequired: false
},
onEnter: ['$state', '$window', '$stateParams', 'logger',
function($state, $window, $stateParams, logger) {
var next = $state.href('dashboard', {}, {absolute: true})
if ($stateParams.next) {
next = decodeURIComponent($stateParams.next)
}
var queryStr = '?retUrl=' + encodeURIComponent(next)
for(var param in $stateParams) {
if ($stateParams[param]) {
queryStr += ('&' + param + '=' + encodeURIComponent($stateParams[param]))
}
}
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '/registration' + queryStr
}
]

},
logout: {
parent: 'auth',
url: '/logout/',
views: {
'header@': {},
Expand Down