@ViewChild is not working for Ionic 4 web components

#1

Does @ViewChild of angular reference ionic 4 webcomponents? It’s not working for me.

#2

Hello,
provide code.

Best regrads, anna-liebt

#3

It seems to work for me, e.g.:

import { Component, ViewChild } from '@angular/core';
import { IonSlides } from '@ionic/angular';

and later

export class Page {
  @ViewChild(IonSlides) slides: IonSlides;

will access the component. I found a nice article on it somewhere now I’ve forgotten that gave examples as well for accessing multiple instances of the same component.

1 Like