mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
changed mainModule to start(entry)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
2
application/application.d.ts
vendored
2
application/application.d.ts
vendored
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user