Finite
Finite copied to clipboard
Added transition to the guard call
I've added the current transition to the guard call, so the guard can be aware of the transition being applied. You can then just define your guard like this: function($stateMachine, $transition)
.
+1 My team would also love if this feature were merged. It allows our Transition guard callbacks to be made aware of runtime $parameters such as currently logged in user object or the result of other permission checks. For example, if the currently logged in user does not have a specific Role/Permission (boolean result injected via $parameter) the guard callback returns false.
@yohang What can we do to have this feature added? It does not break BC.
@yohang any plans on adding this ?
+1