I always used:
@ViewChild('tabs') tabs;
....
this.tabs.nativeElement.something
.....
But this doesn’t work using any of the ionic components. How can I access any of the properties/methods/events of the ionic4/stencil components using JavaScript?
It is giving me an error of selectedTab is undefined.
ERROR TypeError: Cannot read property 'selectedTab' of undefined
at TabsPage.push../src/app/tabs/tabs.page.ts.TabsPage.ngDoCheck (tabs.page.ts:32)
at checkAndUpdateDirectiveInline (core.js:22101)
at checkAndUpdateNodeInline (core.js:23362)
at checkAndUpdateNode (core.js:23324)
at debugCheckAndUpdateNode (core.js:23958)
at debugCheckDirectivesFn (core.js:23918)
at Object.eval [as updateDirectives] (TabsPage_Host.ngfactory.js? [sm]:1)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:23910)
at checkAndUpdateView (core.js:23306)
at callViewAction (core.js:23547)