Custom button action in notification
See original GitHub issueI tried the following code:
this._service.html('Are you sure?<br/><button md-button (click)="freeUser()">Yes</button>',"info");
Unfortunetly the click event not working, so my question is, if there is any way to make custom button with some action in a notification body?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Adding button action in custom notification - Stack Overflow
I have made custom notification and there is a button in that, I want to perform two different functionalities on notification and button...
Read more >How to Use Action Buttons to Make Push Notifications Interactive
All you need to do is go to "New Message", select "Options", and add custom action buttons in the dashboard interface specific to...
Read more >Declaring Your Actionable Notification Types - Apple Developer
Differentiate your notifications and add action buttons to the notification interface. ... Declare Your Custom Actions and Notification Types.
Read more >Manage Notification button settings - Oracle Help Center
Adding Custom Interactive Notification buttons · In the Name field, type the button name. · In the ID field, type the button ID....
Read more >Custom Notification Buttons - Airship Docs
Create a New Notification Button · Button Label: Identifies button label for display purposes in the dashboard. · ID: Associates actions with the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hi, Here is an easy way to add button inside notification and bind it to an action: demo: https://angular-j9rrgn.stackblitz.io code: https://stackblitz.com/edit/angular-j9rrgn
And thanks @flauc for your great lib! 😃
I’m working on a solution, but I’ve been short on time lately. Anyway the solution uses
ViewContainerRef.createComponent()
to dynamically create the provided component in side of the notification.With this approach you could create a component and then pass it to the notification service. The only down side is that you will have to use a service to communicate with the component.
It would look something like this: