flauc / ng-push

An Angular wrapper around the Notifications API
MIT License
59 stars 12 forks source link

Please add @NgModule annotation #2

Closed areijngoudt closed 7 years ago

areijngoudt commented 7 years ago

When I import the module in this way:

import { PushNotificationsModule } from 'ng-push';
...
@NgModule({
    imports: [
        ...
        PushNotificationsModule,
        ...

I get this runtime error

Uncaught Error: Unexpected value 'PushNotificationsModule' imported by the module 'SharedModule'. Please add a @NgModule annotation.

I've upgraded to angular 5.0.0 and now try to use ng-push instead of angular2-notifications.

flauc commented 7 years ago

Hi @areijngoudt,

Thank you for pointing this out 👍
I will look into it later today, asap basically.

flauc commented 7 years ago

I can't recreate your issue. What setup are you using? Can you please try to create a basic plunkr with the issue?

areijngoudt commented 7 years ago

I solved it by importing the PushNotificationsService directly and added it to the providers collection of my own shared module. So for now my problem is solved. Thanks.

flauc commented 7 years ago

I'm happy to hear it 👍