Create new page


#1


this is my project structure my main-page.xml is where I put my UI components and main-page.js is where code my question is how to create other page and put now UI element on it and call it from my code I tried this this

const factoryFunc = () => {
    const label = new labelModule.Label();
    label.text = "Hello, world!";
    const page = new pagesModule.Page();
    page.content = label;
    return page;
};
topmost().navigate(factoryFunc);

is working but I need page XML with it because I'm working with plugin doesn't support  js code


#2

Create a xml file and put your UI components just like how you did in main-page.xml then later just pass the new xml file name to the navigate method.

For example if you create details-page.xml then it will be

topmost().navigate("details-page");

#3

thanks man for the help again