registerBackButtonAction doesn’t work.
I executed the following code, but when I press the hardware back button, nothing is displayed in the log.
What should I do?
import { Platform } from 'ionic-angular';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage = TabsPage;
constructor(platform: Platform) {
platform.registerBackButtonAction(() => {
console.log("Backbutton pressed.");
}, 100);
});
}
}