What I want to achieve is to disable and re-enable the back button at a certain moment of time. I used the following method to disable the back button:
disableBackButton() {
history.pushState(null, null, location.href);
this.locationStrategy.onPopState(() => {
history.pushState(null, null, location.href);
})
}
However, I don't know how to implement a function to "re-enable" the back button.