Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No provider for NotificationsService with documented usage #146

Closed
asnelling opened this issue Feb 4, 2017 · 0 comments
Closed

No provider for NotificationsService with documented usage #146

asnelling opened this issue Feb 4, 2017 · 0 comments

Comments

@asnelling
Copy link
Contributor

asnelling commented Feb 4, 2017

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.

asnelling added a commit to asnelling/angular2-notifications that referenced this issue Feb 4, 2017
flauc added a commit that referenced this issue Feb 4, 2017
Need to call .forRoot() in toast docs when importing from AppModule #146
kdechant added a commit to kdechant/eamon that referenced this issue Feb 4, 2017
@flauc flauc closed this as completed Apr 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants