Html: Nota;para colocar el codigo Html solamente tipea !. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <div id="app"> {{mensaje}} <hr> <input type="button" @click="mostrar=!mostrar" value="Click"> <input v-if="mostrar" v-model="mensaje2"> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js"></script> </body> </html> JavaScript: const app = new Vue ({ el:"#app", data: { mensaje:"Aja", mensaje2:"Hola Bomboncito", mostrar:false } }) Salida:
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter