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


TypeScript application.start函數代碼示例

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


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

示例1:

import * as applicationModule from 'application';
import * as navigationModule from './shared/navigation';

applicationModule.mainModule = navigationModule.loginPage();
applicationModule.start();
開發者ID:alexziskind1,項目名稱:msgraphtests,代碼行數:5,代碼來源:app.ts

示例2: moment

import * as application from "application";
import * as moment from "moment";

application.resources.dateFormat = (value: Date, format: string) => {
    return moment(value).format(format);
};

application.start({ moduleName: "view/landing-splash" });
開發者ID:PeterStaev,項目名稱:tangra-weather-app,代碼行數:8,代碼來源:app.ts

示例3:

import * as app from 'application';
app.mainModule = "main-page";
app.cssFile = "./app.css";
app.start();
開發者ID:abuda7em,項目名稱:nativescript-cardview,代碼行數:4,代碼來源:app.ts

示例4:

import * as application from 'application';
application.start({ moduleName: 'login/login' });
開發者ID:dahabit,項目名稱:nativescript-sinch,代碼行數:2,代碼來源:app.ts

示例5: function

import * as appModule from 'application';
import * as navigationModule from './shared/navigation';

if(appModule.android) {
    appModule.onLaunch = function (intent) {
        console.log('onLaunch');
        appModule.android.onActivityCreated = function (activity) {
            console.log('onCreated');
            var id = activity.getResources().getIdentifier('AppTheme', 'style', activity.getPackageName());
            activity.setTheme(id);
        }

        appModule.android.onActivityStarted = function (activity) {
            console.log('onStarted');
            var window = activity.getWindow();
            if (window) {
                window.setBackgroundDrawable(null);
            }
        }
    }
}

// Set the start module for the application
appModule.mainModule = navigationModule.startingPage();
appModule.cssFile = 'styles/app.css';

// Start the application
appModule.start();
開發者ID:ArronNandoTech,項目名稱:NativeScript-Demo,代碼行數:28,代碼來源:app.ts

示例6:

import * as application from 'application';
application.mainModule = "main-page";
application.cssFile = "./app.css";
application.start();
開發者ID:ChrisFlannagan,項目名稱:nativescript-audio,代碼行數:4,代碼來源:app.ts

示例7:

import * as app from 'application';
app.start({ moduleName: "main-page" });
開發者ID:firecube,項目名稱:Year4Code,代碼行數:2,代碼來源:app.ts

示例8:

import * as application from "application";
application.cssFile = "./tns_modules/nativescript-unit-test-runner/app.css";
application.start({ moduleName: "./tns_modules/nativescript-unit-test-runner/main-page" });
開發者ID:NathanWalker,項目名稱:nativescript-unit-test-runner,代碼行數:3,代碼來源:app.ts


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