In Ionic Core (Ionic Framework and JavaScript), replacing the url using history.replace(null, null, NEWURL) will replace the url with NEWURL, however, using the browser back button followed by the browser forward button causes the root page to be shown instead of the page for which the url was replaced.
How can the url be replaced so that the page (component) is kept in the browser history in its current state, it is not refreshed/recreated, and it can be re-visited using the browser forward and back buttons?