Skip to content

Commit 46119de

Browse files
committed
UI must be created before first render, drainMicroTasks when the first page is created
1 parent c8a3683 commit 46119de

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: nativescript-angular/platform-common.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,18 @@ export class NativeScriptPlatformRef extends PlatformRef {
207207
reject(err);
208208
}
209209
});
210+
211+
(<any>global).Zone.drainMicroTaskQueue();
210212
});
211213

212214
page.on(Page.navigatingToEvent, initHandler);
213215

214216
return page;
215-
}
217+
},
218+
animated: false
216219
};
217220

218221
if (isReboot) {
219-
navEntry.animated = false;
220222
navEntry.clearHistory = true;
221223
}
222224

Diff for: nativescript-angular/zone-js/dist/zone-nativescript.js

+2
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ var Zone$1 = (function (global) {
616616
_isDrainingMicrotaskQueue = false;
617617
}
618618
}
619+
Zone.drainMicroTaskQueue = drainMicroTaskQueue;
619620
function isThenable(value) {
620621
return value && value.then;
621622
}
@@ -1576,6 +1577,7 @@ function patchEventTargetMethods(obj, addFnName, removeFnName, metaCreator) {
15761577
return false;
15771578
}
15781579
}
1580+
var originalInstanceKey = zoneSymbol('originalInstance');
15791581
// wrap some native API on `window`
15801582

15811583

0 commit comments

Comments
 (0)