Nativescript tabview fragment "onload" not firing correctly

nativescriptcore
android

#1

I am implementing Tabview in Nativescript Core App (Javascript). Each tab contain separate fragment and each fragment has separate “loaded” event. But all the events fired at the same time. I want to make it when the tabitem load. How to solve this???


#2

Can you create a playground example to demonstrate the issue?


#3

Yes, sure sir. This is the link.


#4

Tabs are lazily loaded only when you set androidTabsPosition to bottom. Otherwise it loads everything at launch as user is allowed to swipe between tabs.


#5

Sir
Please check the URL now

The project contain tabview with two tabs and each tab item has separate data models, viewModelOne and viewModelTwo. But When we set,
page.bindingContext = viewModelOne then Tab1 data will disappear.
Similarly when we set page.bindingContext = viewModelTwo then Tab2 data will disappear.
Both tab data not loaded at same time.