fix: use pushState instead of hash replace

fixes #542
This commit is contained in:
Roman Hotsiy 2018-06-21 13:47:07 +03:00
parent 4694b6f9ca
commit 83fca7d9ff
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -27,10 +27,6 @@ export class IntHistoryService {
}
emit = () => {
if (this.causedHashChange) {
this.causedHashChange = false;
return;
}
this._emiter.emit(EVENT, this.hash);
};
@ -59,9 +55,8 @@ export class IntHistoryService {
}
return;
}
this.causedHashChange = true;
if (IS_BROWSER) {
window.location.hash = hash;
window.history.pushState(null, '', window.location.href.split('#')[0] + '#' + hash);
}
}
}