this is right solution but there error will occur if u put the ‘navbar’ what u have to do is
@ViewChild(Navbar) navBar: Navbar;
ionViewDidLoad() {
this.navBar.backButtonClick = (e:UIEvent)=>{
// console.log("in");
this.backbutton() };
}
if u notice i removed the ‘’ from the @ViewChild(‘navbar’) where i became @ViewChild(Navbar) navBar: Navbar;