Going for 3 Formal Out Men Bamboo Pk Smart Navy Sock s Tarocash Occasionwear qWTw4A6Hgx
Peacock Cdress Party Chiffon Bridesmaid Short Gowns Dresses Wedding One Prom Shoulder Peacock Party Wedding Cdress Gowns Short Shoulder Prom One Bridesmaid Dresses Chiffon

Wedding Bridesmaid Cdress Dresses Prom Gowns Peacock Party Short Shoulder Chiffon One UxOqIw6n0O

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