screen_rotation
Copied to Clipboard
<html> <head> <script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <body> <div id="app"> <h3>Adding Newline Characters in a String in Vue Js</h3> <p class="newlineStringStyle">{{result}}</p> </div> <script type="module"> import { createApp } from "vue"; createApp({ data() { return { result: "Hello World! \n Welcome to fontawesomeicons.com!", }; }, }).mount("#app"); </script> <style> .newlineStringStyle { white-space: pre-line; /* or pre-wrap */ } </style> </body> </head> </html>