dist/amd/aurelia-router.js
function (plan, callbackName, list) {
        if (list === void 0) { list = []; }
        for (var viewPortName in plan) {
            var viewPortPlan = plan[viewPortName];
            var prevComponent = viewPortPlan.prevComponent;
            if ((viewPortPlan.strategy === activationStrategy.invokeLifecycle || viewPortPlan.strategy === activationStrategy.replace)
                && prevComponent) {
                var viewModel = prevComponent.viewModel;
                if (callbackName in viewModel) {
                    list.push(viewModel);
                }
            }
            if (viewPortPlan.strategy === activationStrategy.replace && prevComponent) {
                addPreviousDeactivatable(prevComponent, callbackName, list);
            }
            else if (viewPortPlan.childNavigationInstruction) {
                findDeactivatable(viewPortPlan.childNavigationInstruction.plan, callbackName, list);
            }
        }
        return list;
    }
function (plan, callbackName, list) {
        if (list === void 0) { list = []; }
        for (var viewPortName in plan) {
            var viewPortPlan = plan[viewPortName];
            var prevComponent = viewPortPlan.prevComponent;
            if ((viewPortPlan.strategy === activationStrategy.invokeLifecycle || viewPortPlan.strategy === activationStrategy.replace)
                && prevComponent) {
                var viewModel = prevComponent.viewModel;
                if (callbackName in viewModel) {
                    list.push(viewModel);
                }
            }
            if (viewPortPlan.strategy === activationStrategy.replace && prevComponent) {
                addPreviousDeactivatable(prevComponent, callbackName, list);
            }
            else if (viewPortPlan.childNavigationInstruction) {
                findDeactivatable(viewPortPlan.childNavigationInstruction.plan, callbackName, list);
            }
        }
        return list;
    }
function ( plan , callbackName , list ) { if ( list === void 0 ) { list = [ ] ; } for ( var viewPortName in plan ) { var viewPortPlan = plan [ viewPortName ] ; var prevComponent = viewPortPlan . prevComponent ; if ( ( viewPortPlan . strategy === activationStrategy . invokeLifecycle || viewPortPlan . strategy === activationStrategy . replace ) && prevComponent ) { var viewModel = prevComponent . viewModel ; if ( callbackName in viewModel ) { list . push ( viewModel ) ; } } if ( viewPortPlan . strategy === activationStrategy . replace && prevComponent ) { addPreviousDeactivatable ( prevComponent , callbackName , list ) ; } else if ( viewPortPlan . childNavigationInstruction ) { findDeactivatable ( viewPortPlan . childNavigationInstruction . plan , callbackName , list ) ; } } return list ; }
Recursively find and returns a list of deactivate-able view models
@internal exported for unit testing
Recursively find and returns a list of deactivate - able view models