0👍
This is pretty easy to do using the <pre>
tag which forces it to preserve white space, new lines, etc. This is often used for preserving formatting in code examples.
<div id="app">
<ul>
<li v-for = "ninja in ninjas" ><pre>{{ninja}}</pre></li>
</ul>
</div>
working example: https://jsfiddle.net/skribe/10yL6va8/8/
You will probably want to use css to style the text surrounded by <pre>
since most browsers automatically format it differently.
- [Vuejs]-Populate Dynamic Input Box with existing Data VueJs
- [Vuejs]-Vue Async Components – How to resolve with emitted event
Source:stackexchange.com