Skip to content

No provider for NotificationsService with documented usage #146

Closed
@asnelling

Description

@asnelling

Importing SimpleNotificationsModule according to the documentation (below):

@NgModule({
    imports: [BrowserModule, SimpleNotificationsModule],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }

results in a "No provider for NotificationsService" error after 313ca4d

The following resolves the error, so it seems the documentation should be updated.

@NgModule({
    imports: [BrowserModule, SimpleNotificationsModule.forRoot()],  // call `.forRoot()` method
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }

I'm gonna put in a PR shortly with updated docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions