On this page
ChildrenOutletContexts
class
Store contextual information about the children (= nested) RouterOutlet
class ChildrenOutletContexts {
  onChildOutletCreated(childName: string, outlet: RouterOutlet): void
  onChildOutletDestroyed(childName: string): void
  onOutletDeactivated(): Map<string, OutletContext>
  onOutletReAttached(contexts: any)
  getOrCreateContext(childName: string): OutletContext
  getContext(childName: string): OutletContext | null
}
   Methods
| 
         
          onChildOutletCreated() 
          | 
      ||||||
|---|---|---|---|---|---|---|
Called when a   | 
      ||||||
        
          | 
      
childName | 
            string | 
            |
outlet | 
            RouterOutlet | 
            
Returns
void
| 
         
          onChildOutletDestroyed() 
          | 
      |||
|---|---|---|---|
Called when a   | 
      |||
        
          | 
      
childName | 
            string | 
            
Returns
void
| 
         
          onOutletDeactivated() 
          | 
      
|---|
Called when the corresponding route is deactivated during navigation. Because the component get destroyed, all children outlet are destroyed.  | 
      
        
          | 
      
| 
         
          onOutletReAttached() 
          | 
      |||
|---|---|---|---|
        
          | 
      
contexts | 
            any | 
            
| 
         
          getOrCreateContext() 
          | 
      |||
|---|---|---|---|
        
          | 
      
childName | 
            string | 
            
Returns
| 
         
          getContext() 
          | 
      |||
|---|---|---|---|
        
          | 
      
childName | 
            string | 
            
Returns
OutletContext | null
© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
 https://v7.angular.io/api/router/ChildrenOutletContexts