Aurelia 2, DI what are the different registrations for?

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

@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

@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?