Print Dresses Dark AU Blue QianQian Sundress Evening Floral Cross Off Womens Fashion Shoulder Party IfxawqS
Decode Formal Chiffon 8 1 Embellished Dress 2 Blue Evening Royal Gown Cutout Evening Formal 2 Blue Chiffon 1 Decode 8 Cutout Embellished Gown Royal Dress

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