<分区>
我想回到上一页。
上一页:job.html 当前页面:jobDetail.html
按照说明,我已将 import { Location } from '@angular/common';
添加到顶部的 jobDetail.component.ts
文件中,然后是
export class MyDetailComponent implements OnInit {
constructor(private location: Location) {}
ngOnInit() {
this.location.subscribe(x => console.log(x));
}
}
我在 jobDetail.html 中有一个 html 代码,但不知道如何继续。如何正确添加上一个按钮。对于像我这样的新手,没有简单的教程。
<a routerLink="">Back</a>