Issue
I have a text with break lines \n and tabulations \t in mdDiaglog. I've tried with Chrome and Firefox but I only have space where I put \t and \n
This is my code :
popup = $mdDialog.alert({
title: 'Popup',
textContent: 'Hello\nWorld\tHello' ,
ok: 'Close'
});
Solution
It is good idea to use htmlContent(). But if you insist on using \n you can do that by some CSS code. You need to set white-space: pre; for md-dialog-content-body p class:
.md-dialog-content-body p{
white-space: pre;
}
Stackblitz working sample.
And the result:
Answered By - Alireza Ahmadi

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.