Easy way to detect which page are navigating from


#1

forexample I have x page and if i’m navigating to this x page from y I want to show something in x page
but if I’m navigating to x page from z page dont show nothing or show different thing.


#2

Hi, have you read the docs
https://docs.nativescript.org/core-concepts/navigation
btw you can get instance of the current page you are on with

import { topmost, NavigationEntry } from "tns-core-modules/ui/frame";
const topFrame = topmost();
const currentPage = topFrame.currentPage;

#3

how can i use this currentPage? what type is this? in debugger it says currentPage is undefined but when i do console log it logged Page(313)@file:///somepage/somepage.xml:1:1;