I have an app where locationType
was set to hash
. When I would go into the url and manually change it, my willTransition would fire. Recently I switched it to auto
and now when I change that url, it does not fire. Thoughts?
Presumably it doesn’t fire because you’re getting a whole-page load instead. That’s the expected behavior. When you type in a new URL, the browser is always going to go and fetch it.
hash
is special because browsers know that everything after #
is local to the given page, so they don’t need a full refresh if only the hash is changing. The traditional use for #
is links that stay within the current document.
1 Like