Bride ANTS The Long Evening Pale s Blue Women Mother of Gown Chiffon Prom Dress 6q6x4g
Dress 8 Decode 1 Evening Cutout Formal Chiffon Blue Gown Royal Embellished 2 8 Blue Dress 2 Decode 1 Cutout Royal Evening Chiffon Formal Embellished Gown

Embellished 1 Cutout 8 Formal Chiffon Dress Gown Royal Evening 2 Decode Blue x7XgqfqZ

A constructor parameter decorator that marks a dependency as optional.

See also

Description

The DI framework provides null if the dependency is not found. For example, the following code allows the possibility of a null result:

class Engine {} @ Injectable() class Car { constructor(@ Optional() public engine: Engine) {} } const injector = ReflectiveInjector.resolveAndCreate([Car]); expect(injector.get(Car).engine).toBeNull();
      
      class Engine {}

@Injectable()
class Car {
  constructor(@Optional() public engine: Engine) {}
}

const injector = ReflectiveInjector.resolveAndCreate([Car]);
expect(injector.get(Car).engine).toBeNull();
    

Options