You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runtime Error
Error in ./HomePage class HomePage - caused by: Cannot read property 'index' of null
Stack
TypeError: Cannot read property 'index' of null
at HomePage.onTabsChange (http://localhost:8100/build/main.js:56074:44)
at CompiledTemplate.proxyViewClass.View_HomePage0.handleEvent_27 (/AppModule/HomePage/component.ngfactory.js:599:34)
at CompiledTemplate.proxyViewClass.<anonymous> (http://localhost:8100/build/main.js:96697:37)
at SafeSubscriber.schedulerFn [as _next] (http://localhost:8100/build/main.js:35084:36)
at SafeSubscriber.__tryOrUnsub (http://localhost:8100/build/main.js:87920:16)
at SafeSubscriber.next (http://localhost:8100/build/main.js:87869:22)
at Subscriber._next (http://localhost:8100/build/main.js:87822:26)
at Subscriber.next (http://localhost:8100/build/main.js:87786:18)
at EventEmitter.Subject.next (http://localhost:8100/build/main.js:19527:25)
at EventEmitter.emit (http://localhost:8100/build/main.js:35064:76)
Expected behavior:
When i used var tab_index = this.tabs.getSelected().index; in ionViewDidEnter() and onSlideDidChange(), all going well.I can get index.
But , i write var tab_index = this.tabs.getSelected().index; into onTabsChange(){}.I got the Runtime Error Cannot read property 'index' of null
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.
Ionic version: (check one with "x")
[ ] 1.x
[ x ] 2.x
I'm submitting a ... (check one with "x")
[ x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Expected behavior:
When i used
var tab_index = this.tabs.getSelected().index;
in ionViewDidEnter() and onSlideDidChange(), all going well.I can get index.But , i write
var tab_index = this.tabs.getSelected().index;
into onTabsChange(){}.I got the Runtime Error Cannot read property 'index' of nullSteps to reproduce:
reproduce:
http://plnkr.co/edit/BAy0Z7?p=preview
Related code:
Other information:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):Similar:
#10523
The text was updated successfully, but these errors were encountered: