• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript page.Page类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap