Skip to content

Container.getAll does not return named bindings #405

Description

@alexmt

Method Container.getAll does not return named bindings

Expected Behavior

All bindings including named should be returned by method

Current Behavior

Currently Container.getAll filters out named bindings.

Steps to Reproduce

Please use following example to reproduce issue:

Example:


let container = new Container();
container.bind(TYPE.Controller)
  .toConstantValue(new AppController()).whenTargetNamed('AppController');
container.getAll(TYPE.Controller);

node_modules/inversify/lib/planning/planner.js:97
            throw new Error(error.message);
            ^
Error: No bindings found for serviceIdentifier: Symbol(Controller)

Context

I'm trying to use inversify-restify-utils library to integrate inversify and restify. Library uses named bindings and method Container.getAll to resolve controller bindings (https://github.com/inversify/inversify-restify-utils/blob/master/src/server.ts#L53 )

Your Environment

  • nodejs: 6.3.1
  • inversify: 3.0.0-beta.1
  • os: mac os 10.12.1

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions