Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49309

Ionic 5 - Modals - Use ElementRef or HTMLElement for the modal

$
0
0

Hello there,

I have a question: In the docs I can see, that it’s possible to use a HTMLElement for the modalCtrl component property, like this:

const modal = await this.modalController.create({
      component: ElementRef,
      cssClass: 'my-custom-class'
    });

But when I try to use it, it’s not working, because it’s just accepting a component type, otherwise it can’t be resolved and I get this error:

Type passed in is not ComponentType, it does not have 'ɵcmp' property

Do I something wrong, are the docs wrong or where is the mistake?

Thanks in advance!

Cheers

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>