I want to customize the click-action of the back button mentioned in this screen capture. I want that by clicking I do not return to the previous page but to a page that I specify myself, or do a treatment before going back.
相关问题
- Angular RxJS mergeMap types
- void before promise syntax
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Ignore Typescript errors in Webpack-dev-server
- How to update placeholder text in ng2-smart-table?
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- Cannot find module 'redux' 怎么解决?
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
For customize default back button action you need override the backButtonClick() method of the NavBar component.
Step 1: In your "custom-class.ts" import Navbar component. Create auxMethod for override the default behavior and called in your ionViewDidLoad method.
This code has been tested in ionic 3.
You can try to use
ionViewCanLeave
orionViewWillLeave
event.See this issue #9533 with proposal to distinguish leave events for "back" navigation. This can be handy for your use case once implemented.