1import {Component} from '@angular/core';
2import {Location} from '@angular/common';
3
4@Component({
5 // component's declarations here
6})
7class SomeComponent {
8
9 constructor(private _location: Location)
10 {}
11
12 backClicked() {
13 this._location.back();
14 }
15}