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

how to support custome notifacation with customer data model. not only (nptification.type, notification.message)) #130

Open
sapxiaojun0226 opened this issue Jul 12, 2019 · 3 comments
Labels
type: feature Indicates a feature or enhancement

Comments

@sapxiaojun0226
Copy link

Hi all,

I want to show some customizing view inside of notification container, and I have define a ng-template with alias. and my ng-template need more complex data model to show.

currently, the angular-notifier only can pass notification object with only has type, message, id field, and using let-notification="notification" to pass the data.

how to support customizing data model like 'let-customData="customData"',
customData is include like
{
"title", "description", "icon", ....
}

can you support that?

BR,
June

@sapxiaojun0226
Copy link
Author

and another question is how to set background color for notification container, now, it only have error/defalut/info/... type. and the background color can not set by ourself.

@dominique-mueller dominique-mueller added the type: feature Indicates a feature or enhancement label Oct 18, 2019
@ysrepo
Copy link

ysrepo commented Apr 27, 2021

@sapxiaojun0226 I reached the custom data by merely extending the interface NotifierNotificationOptions and then in template I could access needed fields. Note, that IDE (VS code in my case) doesn't prompt me the fields, but it compiles and works ok.

@AFDevMike
Copy link

We ended up passing a json object string into .message and JSON.parse it from template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Indicates a feature or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants