@@ -193,6 +193,13 @@ export class NavControllerBase extends Ion implements NavController {
193
193
194
194
// get the leaving view which the _insert() already set
195
195
let leavingView = this . getByState ( STATE_INIT_LEAVE ) ;
196
+ if ( ! leavingView && this . _isPortal ) {
197
+ // if we didn't find an active view, and this is a portal
198
+ let activeNav = this . _app . getActiveNav ( ) ;
199
+ if ( activeNav ) {
200
+ leavingView = activeNav . getByState ( STATE_INIT_LEAVE ) ;
201
+ }
202
+ }
196
203
197
204
// start the transition, fire resolve when done...
198
205
this . _transition ( enteringView , leavingView , opts , done ) ;
@@ -224,6 +231,14 @@ export class NavControllerBase extends Ion implements NavController {
224
231
225
232
// first see if there's an active view
226
233
let view = this . getActive ( ) ;
234
+ if ( ! view && this . _isPortal ) {
235
+ // if we didn't find an active view, and this is a portal
236
+ let activeNav = this . _app . getActiveNav ( ) ;
237
+ if ( activeNav ) {
238
+ view = activeNav . getActive ( ) ;
239
+ }
240
+ }
241
+
227
242
if ( view ) {
228
243
// there's an active view, set that it's initialized to leave
229
244
view . state = STATE_INIT_LEAVE ;
@@ -343,6 +358,16 @@ export class NavControllerBase extends Ion implements NavController {
343
358
// get the view thats ready to enter
344
359
let enteringView = this . getByState ( STATE_INIT_ENTER ) ;
345
360
361
+ if ( ! enteringView && this . _isPortal ) {
362
+ // if we didn't find an active view, and this is a portal
363
+ let activeNav = this . _app . getActiveNav ( ) ;
364
+ if ( activeNav ) {
365
+ enteringView = activeNav . last ( ) ;
366
+ if ( enteringView ) {
367
+ enteringView . state = STATE_INIT_ENTER ;
368
+ }
369
+ }
370
+ }
346
371
if ( ! enteringView && ! this . _isPortal ) {
347
372
// oh nos! no entering view to go to!
348
373
// if there is no previous view that would enter in this nav stack
0 commit comments