question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

notifications are not visible

See original GitHub issue

Hi, thanks for this library.

I added SimpleNotificationsModule to my imports array

in my component.ts file i imported

import { NotificationsService, SimpleNotificationsComponent } from 'angular2-notifications'

and the component itself only consists of


export class DashboardComponent implements OnInit {
  public text: string;
  public environmentName: string;
  public options = {
    position: ["bottom", "left"],
    timeOut: 5000,
    lastOnBottom: true
  }
  constructor(private sessionService: SessionService, private _service: NotificationsService) {
    this.environmentName = environment.name;


  }
  ngOnInit() {
    this._service.alert("hi", "hi")
    this._service.success("this.title", "this.content", {id: 123});

  }

}

in my component.html file I added <simple-notifications></simple-notifications>

but nothing comes up, i can see the element created but it has zero height and it has no content inside it. photo

Am i doing something wrong?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:32 (10 by maintainers)

github_iconTop GitHub Comments

12reactions
flauccommented, Feb 8, 2017

Okay so it looks like calling the notification in AfterViewInit() actually works. So you can use that as a fix for now. I’ll dig deeper when I get a bit more time to look in to it.

3reactions
flauccommented, Feb 6, 2017

Thanks @martov1 👍

Sorry guys I’m completely out of time at the moment, I’ll try to work on it as soon as possible. If someone can recreate the issue in a plunkr it would be extremely helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Notifications Not Showing up on Android - Lifewire
How to Fix No Notifications on Android · Check That Do Not Disturb is not enabled. · Restart your phone. · Make sure...
Read more >
Android Notifications Not Showing Up? 10 Fixes You Can Try
Android Notifications Not Showing Up? 10 Fixes You Can Try · 1. Reboot Your Phone · 2. Review the App's Notification Settings ·...
Read more >
Android Notifications Not Showing Up? (Try THIS Now!)
9 Easy Tips to Fix Android Notifications Not Showing Up · Restart the Android Device · Disable Airplane Mode · Turn Off Do...
Read more >
Android Notifications Not Working [ 2022 Ultimate Fixes]
1Why Are My Notifications Not Showing Up on Android? · Check if the Do Not Disturb mode is enabled. · Check if battery...
Read more >
5 ways to fix iPhone notifications when you're not receiving them
1. Open the Settings app. · 2. Tap Notifications. · 3. Tap on Show Previews at the top. · 4. Tap Always so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found