Skip to content
This repository was archived by the owner on Sep 20, 2020. It is now read-only.

Commit 598452e

Browse files
fix(transition): transition promise now resolved correctly
closes #152
1 parent 21d1d12 commit 598452e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/transition.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ angular.module("ct.ui.router.extras.transition", [ 'ct.ui.router.extras.core' ])
4040
return function successFn(data) {
4141
popStack();
4242
$rootScope.$broadcast("$transitionSuccess", tSuccess);
43-
return deferred.resolve(data);
43+
deferred.resolve(data); // $transition$ deferred
44+
return data;
4445
};
4546
}
4647

@@ -50,7 +51,8 @@ angular.module("ct.ui.router.extras.transition", [ 'ct.ui.router.extras.core' ])
5051
return function failureFn(error) {
5152
popStack();
5253
$rootScope.$broadcast("$transitionError", tFail, error);
53-
return deferred.reject(error);
54+
deferred.reject(error); // $transition$ deferred
55+
return $q.reject(error);
5456
};
5557
}
5658

0 commit comments

Comments
 (0)