Angular:后退按钮功能

问题描述 投票:-1回答:1

我有10页在每个页面上,我需要实现后退按钮功能

返回按钮导航页面到该页面之前的页面我是否应该为此功能创建指令或组件

angular components directive
1个回答
0
投票
constructor(private location: Location) {}

back() {
  this.location.back();
}
© www.soinside.com 2019 - 2024. All rights reserved.