projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc28d47
)
redirect to new state page
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 25 Jan 2013 12:20:37 +0000
(13:20 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 25 Jan 2013 12:20:37 +0000
(13:20 +0100)
app/js/controllers.js
patch
|
blob
|
history
diff --git
a/app/js/controllers.js
b/app/js/controllers.js
index
977758c
..
6846bb7
100644
(file)
--- a/
app/js/controllers.js
+++ b/
app/js/controllers.js
@@
-27,7
+27,8
@@
function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $
registration.$save( function(registration) {
$log.info('id =', registration.id, 'state = ', registration.state);
if ( registration.id && registration.state ) {
- if ( ! info_message ) {
+ $log.error( $location.path(), registration.state, $routeParams );
+ if ( $location.path().split(/\//)[1] != registration.state ) {
$location.path( '/' + registration.state + '/' + registration.id );
} else {
$scope.info = { message: info_message, css_class: 'alert-success' };