NoProviderError

export class NoProviderError

exported from angular2/core defined in angular2/src/core/di/exceptions.ts (line 62)

Thrown when trying to retrieve a dependency by Key from Injector, but the Injector does not have a Provider for Key.

Example (live demo)

class A { constructor(b:B) {} } expect(() => Injector.resolveAndCreate([A])).toThrowError();

Constructor

constructor(injector: Injector, key: Key)

Not Yet Documented