fix(platform): better detect platforms + css API

fixes #15165
fixes #15116
This commit is contained in:
Manu Mtz.-Almeida
2018-08-25 16:25:31 +02:00
parent 70a38ac594
commit 3ffa3cd7db
18 changed files with 167 additions and 300 deletions

View File

@ -797,29 +797,21 @@ export class Nav implements NavOutlet {
...opts
};
const trns = await transition(animationOpts);
return this.transitionFinish(trns, enteringView, leavingView, opts);
const { hasCompleted } = await transition(animationOpts);
return this.transitionFinish(hasCompleted, enteringView, leavingView, opts);
}
private transitionFinish(
trans: Animation | null,
hasCompleted: boolean,
enteringView: ViewController,
leavingView: ViewController | undefined,
opts: NavOptions
): NavResult {
const hasCompleted = trans ? trans.hasCompleted : true;
const cleanupView = hasCompleted ? enteringView : leavingView;
if (cleanupView) {
this.cleanup(cleanupView);
}
// this is the root transition
// it's safe to destroy this transition
if (trans) {
trans.destroy();
}
return {
hasCompleted,
requiresTransition: true,