Article From:https://segmentfault.com/q/1010000011700087
Question:
<section>
    {{content}}
</section>

contentIs a string, the value ishey<br/>hey
After renderingsectionThe text ishey<br/>hey,Why?<br/>It is not recognized by browser as newline character.

Answer 0:

emmmmm….Because this is done after the string is compiled.&ltbr&gt

<section v-html="content"></section>

Link of this Article: Vuejs template compilation problem

Leave a Reply

Your email address will not be published. Required fields are marked *