Skip to content
This repository was archived by the owner on Nov 11, 2017. It is now read-only.
This repository was archived by the owner on Nov 11, 2017. It is now read-only.

Factory name for injecting into StateManagers in an initializer? #16

Description

@atduskgreg

Hi,

I'm trying to use application.inject() in an initializer in order to make an object available to my StateManager and I was wondering what the correct name for the factory of StateManagers is in order to do this?

For example, here I register my PassManager object and inject it into my application's controllers:

application.register('service:pass_manager', PassManager);
application.inject('controller', 'passManager', 'service:pass_manager');

This works correctly. But now I want to also inject this same PassManager object into the StateManager subclasses I'm using in my application. I tried:

application.inject('stateManager', 'passManager', 'service:passManager');

without any luck. Is it possible to inject into StateManager in this way?

(Note: It happens that the object I'm trying to inject is also a StateManager subclass, but that doesn't seem to me like it would be a problem other than needing to scope this inject statement to not be circular, for example by changing the first argument to: 'stateManager:MyOtherSMSubclass' rather than simply 'stateManager' or whatever the correct factory name is.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions