Navigating within the page

nativescriptcore

#1

Hi

How can we navigate within the page or at the top of the page programmatically?

Thanks
Rakesh


#2

What you mean by navigating within the page? If its about updating part of the page, you got to handle it yourself by adding / removing children from container with NativeScript Core.

If you use Angular, it allows you to use child routers to handle this scenario.


#3

Thanks @manojdcoder for your response. Lets say I have a ListView and I have four buttons which filters this list and shows the changed list on the screen. Whenever I change this list, it doesnt scroll user to top of the page again instead it keeps user at the same location even when the page result is updated. I want user to be table to the top of the page.

Another thing which I want is lets say I want user to be taken to a particular Label with some id, how can I do that?


#4

Please try to create a playground example where we can reproduce your issue.

Besides, when ListView is updated with new data source it should reload, also any time you can scroll to top using .scrollToIndex(0) method


#5

Thanks @manojdcoder. This worked for me.