SyntaxFix
Write A Post
Hire A Developer
Questions
add Location to your constructor from @angular/common
@angular/common
constructor(private _location: Location) {}
add the back function:
back() { this._location.back(); }
and then in your view:
<button class="btn" (click)="back()">Back</button>