Function lazyInject

  • A decorator that injects a dependency lazily using container. Mostly used for classes where you can't control the creation of it. Can only be used on properties

    Parameters

    • container: Container

      The container to use

    • Optionalname: string

      The dependency name

    • Optionalnamespace: string

      The namespace

    • Optionalfilter: Filter

      Filter object

    • Optionalarray: boolean

      Inject arrays

    • cache: boolean = true

      Cache return values, can be invalidated by setting the property to undefined

    Returns PropertyDecorator