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

Feat: Render html content in PageAlertContainerComponent #16026

Closed
masumulu28 opened this issue Mar 21, 2023 · 0 comments
Closed

Feat: Render html content in PageAlertContainerComponent #16026

masumulu28 opened this issue Mar 21, 2023 · 0 comments
Assignees
Milestone

Comments

@masumulu28
Copy link
Member

masumulu28 commented Mar 21, 2023

Todo

We sould be able to show html content in page alert for title and message part

Example

//module.ts
CoreModule.forChild({
  localizations: [
    {
      culture: 'en',
      resources: [
        {
          resourceName: 'AbpApp',
          texts: {
            'HtmlTitle{0}': `This is html title with param: <b>{0}</b>`,
            'HtmlMessage{0}{1}': `HTML message with link: <a href="{0}" class="alert-link text-info" target="_blank">{1}</a>`,
          },
        },
      ],
    },
  ],
}),
//component.ts
constructor(public readonly pageAlert: PageAlertService) {}
showWarning() {
  this.pageAlert.show({
    type: 'info',
    message: 'AbpApp::HtmlMessage{0}{1}',
    messageLocalizationParams: ['https://abp.io', 'abp.io'],
    title: 'AbpApp::HtmlTitle{0}',
    titleLocalizationParams: ['Test'],
  });
}

Result

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant