changed mainModule to start(entry)

This commit is contained in:
Vladimir Enchev
2016-01-19 17:02:06 +02:00
parent 97738bd45e
commit d05426c22d
43 changed files with 49 additions and 89 deletions

View File

@@ -315,7 +315,10 @@ global.__onUncaughtError = function (error: Error) {
exports.notify({ eventName: dts.uncaughtErrorEvent, object: appModule.android, android: error });
}
exports.start = function () {
exports.start = function (entry?: frame.NavigationEntry) {
if (entry) {
dts.mainEntry = entry;
}
dts.loadCss();
}

View File

@@ -124,7 +124,7 @@ declare module "application" {
/**
* Call this method to start the application. Important: All code after this method call will not be executed!
*/
export function start();
export function start(entry?: frame.NavigationEntry);
/**
* The main entry point event. This method is expected to use the root frame to navigate to the main application page.

View File

@@ -224,8 +224,11 @@ global.__onUncaughtError = function (error: Error) {
}
var started: boolean = false;
exports.start = function () {
exports.start = function (entry?: frame.NavigationEntry) {
if (!started) {
if (entry) {
exports.mainEntry = entry;
}
started = true;
exports.loadCss();
UIApplicationMain(0, null, null, exports.ios && exports.ios.delegate ? NSStringFromClass(exports.ios.delegate) : NSStringFromClass(Responder));