Run 'pages' off of one Template? Possible?


Just thinking out loud here, and was wondering, is it possible to setup a single XML file that you can run all your ‘pages’ in?

I imagine you pull in these pages via JS at that point?

Our design calls for the same ‘header’ and ‘footer’ for all ‘pages’.

I’m pretty new to Nativescript, just wanted to save on so much copy and paste.

I will say though, that I do have 2 components setup, called ‘header’ and ‘footer’, but I still have to have them called in each XML ‘page’.

If this is dumb, just delete this topic haha.

Thanks for any insight on this!


hi, this is an :nng: example, but I’m doing something a little similar to what you are proposing here: In the ‘home’ component, I have a TabView, and I use partials in it for the actual content. Maybe this will get you started.


I’ll check it out, thank you :smiley: