当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript application.run函数代码示例

本文整理汇总了TypeScript中tns-core-modules/application.run函数的典型用法代码示例。如果您正苦于以下问题:TypeScript run函数的具体用法?TypeScript run怎么用?TypeScript run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了run函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: require

import "./bundle-config";
import * as application from 'tns-core-modules/application';
import { UnhandledErrorEventData } from "tns-core-modules/application";

// added this here so we can do some wiring
require("nativescript-plugin-firebase");

// testing this.. we may be able to hook that up to Crashlytics. Either via docs, or automatically.
application.on(application.uncaughtErrorEvent, (args: UnhandledErrorEventData) => {
  console.log("[app.js]: Uncaught NativeScript Error: " + args.error);
});

application.run({ moduleName: "main-page" });
开发者ID:NathanWalker,项目名称:nativescript-plugin-firebase,代码行数:13,代码来源:app.ts

示例2:

import * as application from "tns-core-modules/application";
// trace.addCategories(trace.categories.All);
// application.run({ moduleName: "modaltest/page.1" });
// application.run({ moduleName: "modaltest/main-page" });

application.run({ moduleName: "modaltest/modal-tab" });
// application.run({ moduleName: "modaltest/textview" });

// application.start({ moduleName: "modaltest/modal-tab.33" });
// application.run({ moduleName: modaltest/modal-frame" });
// application.start({ moduleName: "modaltest/page.2" });
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:11,代码来源:app.ts

示例3:

import * as application from 'tns-core-modules/application';

application.run({moduleName: 'app-root'});
开发者ID:triniwiz,项目名称:nativescript-socketio,代码行数:3,代码来源:app.ts

示例4:

/*
In NativeScript, the app.ts file is the entry point to your application.
You can use this file to perform app-level initialization, but the primary
purpose of the file is to pass control to the app’s first module.
*/

import * as app from "tns-core-modules/application";

app.run({ moduleName: "app-root" });

/*
Do not place any code after the application has been started as it will not
be executed on iOS.
*/
开发者ID:anarchicknight,项目名称:nativescript-vibrate,代码行数:14,代码来源:app.ts

示例5:

import * as application from "tns-core-modules/application";

application.run({ moduleName: "app-root" });
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:3,代码来源:app.ts


注:本文中的tns-core-modules/application.run函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。