當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript page.Page類代碼示例

本文整理匯總了TypeScript中ui/page.Page的典型用法代碼示例。如果您正苦於以下問題:TypeScript Page類的具體用法?TypeScript Page怎麽用?TypeScript Page使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Page類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: Page

        create: (): Page => {
            let page = new Page();
            if (appOptions) {
                page.actionBarHidden = appOptions.startPageActionBarHidden;
            }

            let onLoadedHandler = function(args) {
                page.off('loaded', onLoadedHandler);
                //profiling.stop('application-start');
                console.log('Page loaded');

                //profiling.start('ng-bootstrap');
                console.log('BOOTSTRAPPING...');
                bootstrap(appComponentType, customProviders).then((appRef) => {
                    //profiling.stop('ng-bootstrap');
                    console.log('ANGULAR BOOTSTRAP DONE.');
                }, (err) => {
                    console.log('ERROR BOOTSTRAPPING ANGULAR');
                    let errorMessage = err.message + "\n\n" + err.stack;
                    console.log(errorMessage);

                    let view = new TextView();
                    view.text = errorMessage;
                    page.content = view;
                });
            }

            page.on('loaded', onLoadedHandler);

            return page;
        }
開發者ID:ImNitinNayar7,項目名稱:nativescript-angular,代碼行數:31,代碼來源:application.ts

示例2: Page

    create: (): Page => {
        const page = new Page();
        const root = new StackLayout();
        page.content = root;

        let onLoadedHandler = function(args) {
            page.off('loaded', onLoadedHandler);
            //profiling.stop('application-start');
            console.log('Page loaded');

            //profiling.start('ng-bootstrap');
            console.log('BOOTSTRAPPING TEST APPS...');
            //bootstrap(MultiPageMain, [NS_ROUTER_PROVIDERS]);

            const rootViewProvider = provide(APP_ROOT_VIEW, { useValue: root });
            
            let singlePageHooksLog = new BehaviorSubject([]);
            const singlePageHooksLogProvider = provide(HOOKS_LOG, { useValue: singlePageHooksLog });
            bootstrap(SinglePageMain, [rootViewProvider, singlePageHooksLogProvider, SinglePageRouterProviders]);

            let multiPageHooksLog = new BehaviorSubject([]);
            const multiPageHooksLogProvider = provide(HOOKS_LOG, { useValue: multiPageHooksLog });
            bootstrap(MultiPageMain, [rootViewProvider, multiPageHooksLogProvider, MultiPageRouterProviders]);
        }

        page.on('loaded', onLoadedHandler);

        return page;
    }
開發者ID:DarthVictor,項目名稱:nativescript-angular,代碼行數:29,代碼來源:main.ts

示例3: function

        let onLoadedHandler = function(args) {
            page.off('loaded', onLoadedHandler);
            //profiling.stop('application-start');
            console.log('Page loaded');

            //profiling.start('ng-bootstrap');
            console.log('BOOTSTRAPPING TEST APPS...');

            platform.bootstrapModule(SinglePageModule);
            platform.bootstrapModule(MultiPageModule);
            platform.bootstrapModule(LazyLoadModule);
        }
開發者ID:leocaseiro,項目名稱:nativescript-angular,代碼行數:12,代碼來源:main.ts

示例4: Page

    create: (): Page => {
        const page = new Page();
        page.content = root;

        let onLoadedHandler = function(args) {
            page.off('loaded', onLoadedHandler);
            //profiling.stop('application-start');
            console.log('Page loaded');

            //profiling.start('ng-bootstrap');
            console.log('BOOTSTRAPPING TEST APPS...');

            platform.bootstrapModule(SinglePageModule);
            platform.bootstrapModule(MultiPageModule);
            platform.bootstrapModule(LazyLoadModule);
        }

        page.on('loaded', onLoadedHandler);

        return page;
    }
開發者ID:leocaseiro,項目名稱:nativescript-angular,代碼行數:21,代碼來源:main.ts

示例5: function

        let onLoadedHandler = function(args) {
            page.off('loaded', onLoadedHandler);
            //profiling.stop('application-start');
            console.log('Page loaded');

            //profiling.start('ng-bootstrap');
            console.log('BOOTSTRAPPING TEST APPS...');
            //bootstrap(MultiPageMain, [NS_ROUTER_PROVIDERS]);
            const rootViewProvider = provide(APP_ROOT_VIEW, { useValue: root });
            let singlePageHooksLog = []
            const singlePageHooksLogProvider = provide(HOOKS_LOG, { useValue: singlePageHooksLog });
            bootstrap(SinglePageMain, [rootViewProvider, singlePageHooksLogProvider, NS_ROUTER_PROVIDERS]);
            let multiPageHooksLog = []
            const multiPageHooksLogProvider = provide(HOOKS_LOG, { useValue: multiPageHooksLog });
            bootstrap(MultiPageMain, [rootViewProvider, multiPageHooksLogProvider, NS_ROUTER_PROVIDERS]);
        }
開發者ID:AndreasLoukakis,項目名稱:nativescript-angular,代碼行數:16,代碼來源:main.ts

示例6: function

                let onLoadedHandler = function(args) {
                    page.off('loaded', onLoadedHandler);
                    //profiling.stop('application-start');
                    console.log('Page loaded');

                    //profiling.start('ng-bootstrap');
                    console.log('BOOTSTRAPPING...');
                    bootstrap(appComponentType, customProviders).then((appRef) => {
                        //profiling.stop('ng-bootstrap');
                        console.log('ANGULAR BOOTSTRAP DONE.');
                        resolve(appRef);
                    }, (err) => {
                        console.log('ERROR BOOTSTRAPPING ANGULAR');
                        let errorMessage = err.message + "\n\n" + err.stack;
                        console.log(errorMessage);

                        let view = new TextView();
                        view.text = errorMessage;
                        page.content = view;
                        reject(err);
                    });
                }
開發者ID:kogai,項目名稱:nativescript-angular,代碼行數:22,代碼來源:application.ts

示例7: require

ďťżimport {Page} from "ui/page";
import * as trace from "trace";
import tests = require("../testRunner");
import {Label} from "ui/label";

trace.enable();
trace.addCategories(trace.categories.Test + "," + trace.categories.Error);

let page = new Page();
page.id = "mainPage";

page.on(Page.navigatedToEvent, onNavigatedTo);

function onNavigatedTo(args) {
    let label = new Label({ text: "Running non-UI tests..." });
    page.content = label
    args.object.off(Page.navigatedToEvent, onNavigatedTo);
    setTimeout(function () {
        tests.runAll();
    }, 10);

}
export function createPage() {
    return page;
}
開發者ID:abrahamwh,項目名稱:NativeScript,代碼行數:25,代碼來源:mainPage.ts

示例8: require

ďťżimport {Page} from "ui/page";
import * as trace from "trace";
import tests = require("../testRunner");

trace.enable();
trace.addCategories(trace.categories.Test + "," + trace.categories.Error);

let started = false;
let page = new Page();

page.on(Page.navigatedToEvent, function () {
    if (!started) {
        started = true;
        setTimeout(function () {
            tests.runAll();
        }, 10);
    }
});

export function createPage() {
    return page;
}

開發者ID:Smarp,項目名稱:NativeScript,代碼行數:22,代碼來源:mainPage.ts

示例9: ngAfterViewInit

    ngAfterViewInit():any {
        this.webview = this._page.getViewById('web');
        // this.webview.on(WebView.loadFinishedEvent, function (args: WebView.loadFinishedEvent) {
        //
        //
        // });

        this.webview.on("loadFinished", function (changeArgs) {
            console.log("Load Finished");
            // Do something with the URL here.
            // E.g. extract the token and hide the WebView.
        });

        this.webview.url = this.formUrl;
    }
開發者ID:V1rus999,項目名稱:NativeScriptGroceryExample,代碼行數:15,代碼來源:webform.component.ts

示例10: ngOnInit

 ngOnInit() {
     let button = this.page.getViewById<Button>("button");
     // >> button-text-code
     button.text = "Primary button";
     // << button-text-code
 }
開發者ID:aymenbraiek,項目名稱:nativescript-sdk-examples-ng,代碼行數:6,代碼來源:text.component.ts


注:本文中的ui/page.Page類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。