Vheissu / aurelia-for-real-world-web-applications-book-feedback

Post feedback as issues here on Github for the Aurelia book. Be as descriptive and honest as you like.
15 stars 0 forks source link

When to use @inject #48

Closed zantinger closed 8 years ago

zantinger commented 8 years ago

Hi, I see a lot of examples which import (i.e.) HttpClient from aurelia-http-client and then use '@inject(HttpClient)' to use http on the constructor. However at the chapter 'Creating A Server-side Log Appender' there is no inject for the HttpClient. I can't find any explanation on this chapter or the chapter for DI why this so is.

opcodewriter commented 8 years ago

I think it's just an error, it should have @inject(HttpClient) decorator on the class

zantinger commented 8 years ago

ok, that's what I thought too. Thanks

Vheissu commented 8 years ago

@zantinger Sorry about that, this is definitely an error. I'll get it fixed up for the next release.