cmaere · GitHub

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

After migrating to angular 17 and ionic 7 i get this error "Module '"@ionic/angular"' has no exported member 'IonBackButtonDelegate'. import IonBackButtonDelegate" Have you removed IonBackButtonDelegate?

Expected Behavior

with ionic 5 i was able to import IonBackButtonDelegate in my component and use it to listen to back click events

Steps to Reproduce

`import { Component, OnInit,ViewChild ,ElementRef, AfterViewInit} from '@angular/core';
import { Platform, IonContent,IonBackButtonDelegate } from '@ionic/angular';

@component({
selector: 'app-chat',
templateUrl: './chat.page.html',
styleUrls: ['./chat.page.scss'],
})
export class ChatPage implements OnInit {

@ViewChild(IonBackButtonDelegate, { static: false }) backButton: IonBackButtonDelegate;

constructor()
{
this.setUIBackButtonAction();

}
setUIBackButtonAction() {
this.backButton.onClick = () => {
};
}

}

`

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.20.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : not installed
@angular-devkit/build-angular : 17.0.10
@angular-devkit/schematics : 17.0.10
@angular/cli : 17.0.10
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 3.6.0
@capacitor/android : 3.6.0
@capacitor/core : 3.6.0
@capacitor/ios : 3.6.0

Utility:

cordova-res (update available: 0.15.4) : 0.15.2
native-run (update available: 2.0.0) : 1.7.4

System:

NodeJS : v21.5.0 (/usr/local/bin/node)
npm : 10.2.4
OS : macOS

Additional Information

No response

Read the original on github.com ↗