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

Alert doesnt show #9

Open
medeirosrafael opened this issue Dec 2, 2017 · 7 comments
Open

Alert doesnt show #9

medeirosrafael opened this issue Dec 2, 2017 · 7 comments

Comments

@medeirosrafael
Copy link

I follow the instruction to install and import to my APP..
but, nothing happens when i create a alert..
No errors, but, the alert it's not showed

@flauc
Copy link
Member

flauc commented Dec 2, 2017

Hi @medeirosrafael

Can you recreate the issue in a plunkr please?

@medeirosrafael
Copy link
Author

Hi, i'll try..
But, i installed with:
npm install --save @jaspero/ng2-alerts

So, in my app.module.ts i imported: JasperoAlertsModule
and in my component, i imported AlertsService..

when i use: this.alertService.create('error','olaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',{duration:9000,overlay:true})
it return null and nothing happens..

i tried debug alerts.component and apparently, it isn't loaded.. i put a alert("aaa"); in ngOnInit and it was not called..

i missed any step?

@flauc
Copy link
Member

flauc commented Dec 2, 2017

Yes,
I think this is your main error:
npm install --save @jaspero/ng-alerts

It's ng-alerts not ng2-alerts.

@medeirosrafael
Copy link
Author

I also tried this package

@flauc
Copy link
Member

flauc commented Dec 2, 2017

Did you import it like this in your AppModule

JasperoAlertsModule.forRoot()

@medeirosrafael
Copy link
Author

Sorry the late to answer. Yes, i tried both, ng-alerts and ng2-alerts, following both documentation.

It's like the alerts.component doesn't is loaded

@rahul-krish
Copy link

rahul-krish commented Jan 19, 2018

Ok. Adding the .forRoot() cleared my issues. thanks. But hey u need to seriously consider updating documentation. Thanks

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

3 participants