Closed netbrothers-tr closed 2 months ago
@netbrothers-tr you are using standalone components, but importing the MenuController
from the non-standalone bundle.
When using standalone components, all service imports need to come from @ionic/angular/standalone
as well.
@sean-perkins, thank you so much for clarifying this! I think we can close the issue. Are there plans to update the docs for Angular standalone usage?
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
Starting from a basic Ionic Angular app created with the Ionic CLI and following the instructions for multiple menus in the docs, the menu controller isn't doing much at all. I have tried to investigate this, but the open issues found seem unrelated or rather remotely related (maybe a regression?).
In the following commit you can see the changes I made to the starter application.
https://github.com/netbrothers-tr/blitz-ionic-angular-menu-controller/commit/1df2ff634099d41ca37c7f32da8b18842cab12fc
Also, the controller's methods seem to have different return types (Promises) than what can be assumed by the documentation.
Expected Behavior
I would expect, that I can use the MenuController as described in the docs.
Steps to Reproduce
After starting the example with
ionic serve
,TEST: ...
Code Reproduction URL
https://github.com/netbrothers-tr/blitz-ionic-angular-menu-controller
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 8.2.6 @angular-devkit/build-angular : 18.1.2 @angular-devkit/schematics : 18.1.2 @angular/cli : 18.1.2 @ionic/angular-toolkit : 11.0.1
Capacitor:
Capacitor CLI : 6.1.1 @capacitor/android : not installed @capacitor/core : 6.1.1 @capacitor/ios : not installed
Utility:
cordova-res : not installed globally native-run : 2.0.1
System:
NodeJS : v20.15.1 (/usr/local/bin/node) npm : 10.7.0 OS : Linux 5.15
Additional Information
No response