You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using hasher in a page that contains a certain base url while the app itself is served in /myapp/, like:
<base href="http://my.domain/">
I did it so to do xhr requests without any special code, xhr.get('my/url') calls http://my.domain/my/url, as expected.
Problem is, I'm using replaceHash to put the url in an initial state, but it's not working well, because it's replacing the entire path:
// url is "http://my.domain/myapp/"
// If I use
hasher.setHash('users')
// url now is "http://my.domain/myapp/#/users"
// But, using replaceHash
hasher.replaceHash('users')
// url now is "http://my.domain/#/users"
Isn't it odd? ReplaceHash and setHash should work similarly, or shouldn't they?
The text was updated successfully, but these errors were encountered:
Hello,
I'm using hasher in a page that contains a certain
base
url while the app itself is served in /myapp/, like:I did it so to do xhr requests without any special code,
xhr.get('my/url')
callshttp://my.domain/my/url
, as expected.Problem is, I'm using replaceHash to put the url in an initial state, but it's not working well, because it's replacing the entire path:
Isn't it odd? ReplaceHash and setHash should work similarly, or shouldn't they?
The text was updated successfully, but these errors were encountered: