Closed jeme closed 10 years ago
after some investigations, this requires another major refactoring of goto.
Thats not a bad thing as goto was intented to be further refactored, but it delays the implementation of this issue.
Pushing this to v0.7 as the re-factoring will change a great deal of things, which I won't guarantee to be fully backwards compatible with the 0.6.x path...
@groner FYI you are now able to return promises from transition handlers and the transition will either proceed when resolved or abort it the promise returned is rejected.
So your syntax would not be:
if (formIsDirty) {
$transition.suspendUntil($modal(...));
}
but rather
if (formIsDirty) {
return $modal(...); //Assuming that modal will result in a promise.
}
@jeme Pretty cool. I look forward to trying it!
from #80.
Either allow for returning a promise in a transition handler, or a syntax like proposed in #80 where we call a method on
$transition
giving it a promise (or value which just resolves instantaneously)This would be very much in line with the rest of the solution.