Not able to import HTMLIonModalElement - ionic v4
See original GitHub issueI am using vs code.
Trying to import HTMLIonModalElement, but found out it’s not been exported.
I am trying to return modal from invoked function but not able to set return type.
async addTodoDialog(todoItem?: Todo): Promise<HTMLIonModalElement> {
const modal = await this.modalController.create({
component: AddTodoComponent,
componentProps: { todoItem }
});
await modal.present();
return modal;
}
Getting error
ReferenceError: HTMLIonModalElement is not defined
I already found this issue opened earlier, but can we have any alternate solution to this. [https://github.com/ionic-team/ionic/issues/14784](Link here #14784)
@peterpeterparker Do you have any resolution to this ?
Regards
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Not able to import HTMLIonModalElement - ionic v4 #17809
I am using vs code. Trying to import HTMLIonModalElement, but found out it's not been exported. I am trying to return modal from...
Read more >How to declare and use modals in Ionic v4 | by David Dal Busco
First thing we have to do in order to use our modal is importing it in the module of the page or component...
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...
Read more >Property 'onDidDismiss' does not exist on type ionic 4 and ...
I have followed this code to create my modal property. async openModal() { const modal: HTMLIonModalElement = await this ...
Read more >How To Declare And Use Ionic Modals With Stencil
The trick is to pass the modal tag name as value of the component variable. import {Component, h} from '@stencil/core'; import {modalController} ...
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
Don’t import it 😉
You should open a question on the Ionic forum for support request