@angular/core

Optional

decorator

Parameter decorator to be used on constructor parameters, which marks the parameter as being an optional dependency. The DI framework provides null if the dependency is not found.

  
    class Optional {}
  
  
Jump to details