我有10页在每个页面上,我需要实现后退按钮功能
返回按钮导航页面到该页面之前的页面我是否应该为此功能创建指令或组件
constructor(private location: Location) {} back() { this.location.back(); }