I found an easy solution, not involving AngularJS only javascript:
<script>
if (window.location.hash.indexOf("#/") != -1 && window.location.hash.indexOf("#!/") == -1 ){
window.location.hash = window.location.hash.replace("#", "#!");
}
</script>