📜  有角度回到上一条路线 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:35.748000             🧑  作者: Mango

代码示例2
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();
  }
}