FactoryProvider

Stable

Interface

What it does

Configures the Injector to return a value by invoking a useFactory function.

How to use

function serviceFactory() { ... } const provider: FactoryProvider = {provide: 'someToken', useFactory: serviceFactory, deps: []};

Interface Overview

interface FactoryProvider {
provide : any
useFactory : Function
deps : any[]
multi : boolean

}

Interface Description

Interface Details

exported from core/index, defined in core/src/di/provider.ts