xxxxxxxxxx
<!-- Create a back button using HTML -->
<button onclick="goBack()">Go Back</button>
<script>
function goBack() {
window.history.back();
}
</script>
xxxxxxxxxx
<form>
<input type="button" value="Go back!" onclick="history.back()">
</form>
here you can see how to use html and js for make a back button
xxxxxxxxxx
<a href="#" onclick="location.href = document.referrer; return false;">Go Back</a>
xxxxxxxxxx
import {Component} from '@angular/core';
import {Location} from '@angular/common';
@Component({
// component's declarations here
})
class SomeComponent {
constructor(private _location: Location)
{}
backClicked() {
this._location.back();
}
}