Base solution for your next web application
Open Closed

How to show the Exception/Message on frontend with the new line/ break functionality. #10276


User avatar
0
mahendra created

Prerequisites

  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)?
  • .net core

Hi Experts,

We want to show the Exception/Message on frontend with the new line/ break functionality.

For example, we have following entry in the iHub.xml:

<text name="ErrorInProvisioningMessage">Error encountered while provisioning.\r\n We are working to bring the system up for you. Please wait or retry..</text>

We tried to put the \r\n for new line, but L("ErrorInProvisioningMessage") function returns the string like below.

And it does not show the message with the new line.

Please see the attached screenshot for your reference.

Could you please let us know how can we acheive this..

Note : User can also change the language text from GUI..which well be saved in the AbpLanguageTexts table.

Thanks in advance

Best Regards


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You should be able to do it like below;

    abp.message.error("This is an error <br /> second line","Error", {isHtml: true})

  • User Avatar
    0
    mahendra created

    Thanks for your help