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

TypeScript application.start函数代码示例

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

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



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

示例1:

/*
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.start({ moduleName: "main-page" });

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


示例2:

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

// Needed only for build infrastructure
application.setCssFileName("devtools-app/app.css");

application.start({ moduleName: "devtools-app/main-page" });
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:6,代码来源:app.ts


示例3:

import * as application from 'tns-core-modules/application';
application.start({ moduleName: 'main-page' });
开发者ID:bradmartin,项目名称:nativescript-audio,代码行数:2,代码来源:app.ts


示例4: if

    if (args.android) {
        // For Android applications, args.android is an NativeScriptError.
        console.log("NativeScriptError: " + args.android);
    } else if (args.ios) {
        // For iOS applications, args.ios is NativeScriptError.
        console.log("NativeScriptError: " + args.ios);
    }
});


// var MyAppDelegate = UIResponder.extend({
//     // Implement a method from UIApplicationDelegate.
//     // We will obtain the method signature from the protocol.
//     canBecomeFirstResponder: function() {
//       return true;
//     },
//     applicationDidFinishLaunchingWithOptions: function (application, launchOptions) {
//       console.log('========== APP LAUNCHED ==========');
//       this.becomeFirstResponder();
//     }
// }, {
//     // The name for the registered Objective-C class.
//     name: "MyAppDelegate",
//     // Declare that the native Objective-C class will implement the UIApplicationDelegate Objective-C protocol.
//     protocols: [UIApplicationDelegate]
// });

// application.ios.delegate = MyAppDelegate;
import "./bundle-config";
application.start({ moduleName: "main-page" });
开发者ID:Notalib,项目名称:nativescript-audioplayer,代码行数:30,代码来源:app.ts


示例5:

import * as application from "tns-core-modules/application";
import * as trace from "tns-core-modules/trace";
trace.addCategories(
    trace.categories.Transition)
// + "," + 
//     trace.categories.NativeLifecycle + "," + 
//     trace.categories.Navigation);
trace.enable();

// Needed only for build infrastructure
application.setCssFileName("navigation-app/app.css");
application.start({ moduleName: "navigation-app/main-page" });
开发者ID:triniwiz,项目名称:NativeScript,代码行数:12,代码来源:app.ts


示例6:

import * as application from "tns-core-modules/application";
application.start({ moduleName: "apps/tests/pages/nnikolovTestPage" });
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:2,代码来源:sandbox-project.ts


示例7:

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

import * as trace from "tns-core-modules/trace";
trace.enable();
trace.setCategories(trace.categories.concat(
    trace.categories.Layout
//, trace.categories.NativeLifecycle
//, trace.categories.Navigation
//, trace.categories.ViewHierarchy
//, trace.categories.VisualTreeEvents
    ));

application.start({ moduleName: "styling/mainPage" });
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:13,代码来源:app.ts


示例8:

/*
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 './bundle-config';
import * as app from 'tns-core-modules/application';

app.start({ moduleName: 'main-page' });

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
TypeScript application.android类代码示例发布时间:2022-05-25
下一篇:
TypeScript application.run函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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