Tgure/ngx-loggly-logger

Error: No provider for LogglyService!

Closed this issue · 3 comments

Using Angular 4 and ngx-loggly-logger 4, and following the new instructions, I get the following error:

AppComponent_Host.html:1 ERROR Error: No provider for LogglyService!
Tgure commented

@doender I will look into it when I get some time, for now in your app.module add this import and add LogglyService to your list of providers and that should resolve that error.

import { LogglyService } from 'ngx-loggly-logger/dist/src/loggly.service';

I noticed I could fix it by calling the forRoot() function (imports: [NgxLogglyModule.forRoot()])

Tgure commented

@doender Nice thanks for the info.