How to use the @nativescript/core/ui/builder.Builder.createViewFromEntry function in @nativescript/core

To help you get started, we’ve selected a few @nativescript/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NativeScript / NativeScript / tests / app / ui / builder / builder-tests.ts View on Github external
function getViewComponent(moduleName: string) {
    return Builder.createViewFromEntry({ moduleName });
}
github NativeScript / NativeScript / tests / app / ui-helper.ts View on Github external
export function navigateWithEntry(entry: NavigationEntry, topFrame?: Frame): Page {
    const page = Builder.createViewFromEntry(entry) as Page;
    entry.moduleName = null;
    entry.create = function () {
        return page;
    };

    waitUntilNavigatedFrom(() => topFrame ? topFrame.navigate(entry) : Frame.topmost().navigate(entry));

    return page;
}