NovuN
Novuβ€’8mo agoβ€’
13 replies
Luiz Carvalho

renderBody handler in Angular

Hey everyone! πŸ‘‹

I'm using Novu Inbox in an Angular project and I'm trying to use
renderBody
to allow rendering
notification.body
as HTML.

In the React docs, I see this example:

<Inbox
  applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
  subscriber="YOUR_SUBSCRIBER_ID"
  renderBody={(notification) => (
    <div>
      <p dangerouslySetInnerHTML={{ __html: notification.body }} />
    </div>
  )}
/>


In Angular, I tried:

renderBody: (el: HTMLDivElement, notification: Notification) => () => {
  console.log('renderBody', el, notification);
},


But
renderBody
is never called. Only
renderNotification
seems to trigger.

Is
renderBody
supported outside of React?
Any recommended approach to customize the body rendering in Angular, ideally allowing raw HTML?

Thanks a lot! πŸ™
Was this page helpful?