I'm trying to find a way to have an attr (href) binding and a click binding on the same anchor tag, and have the function bound to the click to decide whether navigation is allowed.
In plain html this would be something like Something In that case if the the function decideNavigation returned true, the navigation to '/' would occur and if it was false, the navigation would be prevented.
At the moment, if I bind a click function, the navigation is just totally blocked.
Any simple way to do this with knockout or would it require something like a custom binding?
Thanks.