question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: IonModal not working on Typescript

See original GitHub issue

Prequisites

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:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
farisfaisalthenacommented, Aug 30, 2021

Yup working now

0reactions
ionitron-bot[bot]commented, Sep 29, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found