Future deactivate(Instruction instruction)

Removes the contents of this router's outlet and all descendant outlets

Source

Future<dynamic> deactivate(Instruction instruction) {
  Instruction childInstruction;
  ComponentInstruction componentInstruction;
  if (instruction != null) {
    childInstruction = instruction.child;
    componentInstruction = instruction.component;
  }
  Future<dynamic> next = _resolveToTrue;
  if (_childRouter != null) {
    next = this._childRouter.deactivate(childInstruction);
  }
  if (_outlet != null) {
    var outlet = this._outlet;
    next = next.then((_) => outlet.deactivate(componentInstruction));
  }
  // TODO: handle aux routes
  return next;
}