本文整理汇总了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();
示例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" });
示例3:
import * as app from 'application';
app.mainModule = "main-page";
app.cssFile = "./app.css";
app.start();
示例4:
import * as application from 'application';
application.start({ moduleName: 'login/login' });
示例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();
示例6:
import * as application from 'application';
application.mainModule = "main-page";
application.cssFile = "./app.css";
application.start();
示例7:
import * as app from 'application';
app.start({ moduleName: "main-page" });
示例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" });