bug: IonModal not working on Typescript
See original GitHub issuePrequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
Current Behavior
When importing the code below Visual Studio will not compile and will give me an error Failed to compile.
import { IonModal } from '@ionic/angular/directives/overlays/ion-modal';
@ViewChild(IonModal, { static: true }) modal: IonModal
Expected Behavior
In order to use any functionality from Ion Modal using typescript, compiling the project should not fail
Steps to Reproduce
Copy paste the code below
import { IonModal } from '@ionic/angular/directives/overlays/ion-modal';
@ViewChild(IonModal, { static: true }) modal: IonModal
Code Reproduction URL
No response
Ionic Info
No response
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
bug: IonModal not working on Typescript · Issue #23846 · ionic ...
When importing the code below Visual Studio will not compile and will give me an error Failed to compile. import { IonModal }...
Read more >Property 'onDidDismiss' does not exist on type ionic 4 and ...
I am developing an app and I have the next class in TypeScript. I want to try to get the ...
Read more >ion-modal: Ionic Mobile App Custom Modal API Component
ion-modal is a dialog that appears on top of mobile app content, and must be dismissed before interaction resumes. Learn more about custom...
Read more >5 Examples of the new Ionic 6 Bottom Sheet Modal
Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.
Read more >How to Customise Ionic 6 Modal and Popover - YouTube
In Ionic 6 the styling of modals and popovers has changed, because they are now using Shadow DOM. Follow this quick win to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup working now
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.