I was expecting the message
to be displayed in two different lines. How do I use <br/>
tag to split the lines in Typescript?
TS code
posts = {
social: {
title: "test",
message: `test message \n
test message`
}
};
HTML
<div>
{{posts.social.message}}
</div>
I created a working example using CodeSandbox. Could anyone please help?
or
tags or the like, or style your div with `white-space: pre`
– Taplar Nov 18 '20 at 23:57