Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 4
    If you refresh on this page, and click on the button that triggers "this.location.back()", it will just trigger a page refresh. Is there any way that the Location module can detect if previous path exists? Commented Jan 9, 2020 at 2:27
  • 2
    Keep in mind if a user went directly to a page where Back button exists and if he clicks on a button.. then he will be throw out of the app to the previous page according to the browser(platform) history. Commented Apr 24, 2020 at 8:23
  • For future readers, look at API docs Commented Apr 24, 2020 at 8:30
  • I had to add BackButtonDirective in the declarations list in app.module.ts to make it work. Commented Mar 24, 2023 at 14:38