# Aurelia 2, DI what are the different registrations for?

**URL:** <https://discourse.aurelia.io/t/aurelia-2-di-what-are-the-different-registrations-for/3358>\
**Category:** Uncategorized\
**Created:** [April 2, 2020, 3:32am UTC](https://discourse.aurelia.io/t/aurelia-2-di-what-are-the-different-registrations-for/3358 "2020-04-02T03:32:24Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![xenoterracide](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/xenoterracide/32/1728_2.png) [@xenoterracide](https://discourse.aurelia.io/u/xenoterracide)\
**Post date:** [April 2, 2020, 2:44pm UTC](https://discourse.aurelia.io/t/aurelia-2-di-what-are-the-different-registrations-for/3358/8 "2020-04-02T14:44:57Z")

</div>

> [@fkleuver](#):
>

thanks, that’s very useful information.

2 more questions…

So I was doing the `DI.createInterface` but then encountered the problem that the string seemed to be no longer stored in the container e.g. I couldn’t do `container.get<Logger>(LoggerDefault)` anymore, what more code do I need to do to also have it added to the container?

on a mostly unrelated note… injection by metadadata only doesn’t seem to be working for me.

this works

```auto
@singleton
export class AmqpSender implements Sender<any, void> {
  constructor(
    @inject(LoggerDefault) private readonly log: Logger,
    @inject(AmqpChannel) private readonly channel: Channel,
  ) {}

```

this will fail to inject `AmqpSender`

```auto
@singleton()
export class OrderService {
  constructor(
    private readonly sender: AmqpSender,
    @inject(LoggerDefault) private readonly log: Logger,
  ) {}

```

now, `reflect-metadata` works and the experimental decorators, blah blah are all their, because typeorm, tsyringe, and probably something else uses that. I’m betting there is something more I have to do in setup to make this work, since I think DI has its own metadata implementation (to be split out in 0.7.0 from the looks for the source.

update: moving the reflect conversation [[SOLVED] Aurelia 2, Kernel/Metadata not detecting metadata properly, bug?](https://discourse.aurelia.io/t/aurelia-2-kernel-metadata-not-detecting-metadata-properly-bug/3363)

---

_[View the full topic](https://discourse.aurelia.io/t/aurelia-2-di-what-are-the-different-registrations-for/3358)._
