Tgure / ngx-loggly-logger

ngx loggly service
MIT License
7 stars 8 forks source link

Error: No provider for LogglyService! #6

Closed doender closed 7 years ago

doender commented 7 years ago

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 7 years ago

@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';

doender commented 7 years ago

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

Tgure commented 7 years ago

@doender Nice thanks for the info.